‎2013 May 28 4:48 PM
Hello experts,
There is a requirement in my project to convert the pdf (getting generated from Smartform) as an image format so that we can send it to any other device too and all indentations can be contained as it is. Any help will be appreciated!!
Thanks,
Garima
‎2013 May 28 5:03 PM
Hi Garima,
use an external free program named : ImageMagick
Regards
Fred
When I have doing this, I wasn't use image magick but GhostScript
Message was edited by: Frédéric Girod
‎2013 May 28 5:17 PM
Hi Fred,
Thanks for replying.
But can you please elaborate on how I can use it for all PDFs which are getting generated in background (SAP RFCs) and should be sent to other devices as an image. How will it communicate with SAP?
Thanks in anticipation!
With Regards,
Garima
‎2013 May 29 6:55 AM
Hi Garima,
you can call an Unix (it's the same for M$) command from SAP using the function SXPG_COMMAND_EXECUTE and playing with transaction SM69.
Or calling directly kernel function CALL 'SYSTEM' ID 'COMMAND' FIELD ...
You have to install GhostScript on each Application Server. The command line looks like gs -dNOPAUSE -sDEVICE=jpeg -r144 -sOutputFile=p%03d.jpg file.pdf
The %03d will allow you to create several JPEG, one by page. The command will replace this char by a number.
If you are on M$, you have to give the complete location of the gs.exe program, not only "gs"
(or you could create a shell script called by SAP)
Regards
Fred
‎2013 May 29 6:27 PM
Hi Fred,
Thanks for your help!
Will it convert XString also to image? In case my project allows me to call any external system.
I am still trying to look for something in SAP to convert the pdf/otf/XString into image which can be then sent to any other device.
With Regards,
Garima
‎2013 May 30 7:05 AM
As I understand Xstring is only a container, not a format. I'm not sure you will find something inside SAP. Maybe with OpenText, but OpenText is very expensive.
regards
Fred
‎2013 May 31 12:52 PM
When I'm writing a document, I see something maybe that you could be interested : function SAPSCRIPT_CONVERT_BITMAP
If you could use a SapScript instead of a Smartforms ...
regards
Fred
‎2013 Jun 10 4:28 PM
Hi Fred,
Thank you so much for your help. I have been in touch with my team to use imageMagick for image conversion.
Once again Thank you!!
Regards,
Garima
‎2013 Jun 20 11:40 AM
Hi Garima,
Please check if the function moduel SCMS_BINARY_TO_XSTRING or any other FM from the function group SCMS_CONV helps.
Regards,
Sahir.