01-11-2019 05:14 AM
Hi everyone.
I would like to convert a jpg file to pdf format.
The use of Ghostscript is preferable.
Tips?
Solved! Go to Solution.
01-11-2019 05:36 AM - edited 01-11-2019 05:38 AM
Hi wall,
The use of Ghostscript is preferable.Tips?
Is this question LabVIEW related? Or do you just want to read the GhostScript manual?
01-11-2019 06:22 AM
So everything you'll do with GS from the command line, you can do in LabVIEW with System Exec.vi... That is a missing peace that you won't find in the GS manual.
01-11-2019 07:13 AM
Thanks for the reply.
The idea is just to call GS using precisely System Exec.vi but I can not make it work properly.
In input I have the path where the jpg file is saved, the name with which I want to rename the pdf and the path where to save the pdf.
Any example ?
Best regards
01-11-2019 07:23 AM
01-11-2019 07:23 AM
@thewall1990 wrote:
Any example ?
Unlikely.
Does it work from the command line? That should be the first step.
If it does, then you only need to get the string passed to the System Exec.vi to match this string. I'd skip calling the System Exec.vi and use an indicator or popup to get it working. If that seems to be the problem, post what you have.
01-11-2019 08:30 AM - edited 01-11-2019 08:31 AM
for the most simplest implementation is used jpeg2pdf.exe
Its a 43 kb executable.
Call is from cmd exec: cmd /c jpeg2pdf.exe "%s" -o "%s"
Where the first %s indicates the filename of the .jpg
2nd %s is the target path of the PDF
Location of .exe http://sourceforge.net/projects/jpeg2pdf/
Upside : no installation of other software required
Downside , the source .jpg file has to be in the same folder as the .exe to work.
01-14-2019 01:09 AM - edited 01-14-2019 01:10 AM
Thanks for the reply, I have adopted the solution proposed by mr but I still have problems.
From Windows command shell it works correctly (as you can see in the picture "cattura1" attached) but when I go to implement it on LabVIEW, it gives me the error that I reported in the picture "cattura2".
What am I doing wrong?
Thanks for your help
01-14-2019 01:23 AM
01-14-2019 01:36 AM - edited 01-14-2019 01:41 AM
Thanks for the help.
I solved the problem.
Very kind.
Wall