Page 1 of 1

[Solved] Terminal -convert command to .pdf format

Posted: Thu Feb 15, 2024 6:36 am
by Laurent
I'm trying to use the convert command for a .tif to .pdf conversion from the command line - e.g.:

“/Applications/GraphicConverter 12/Contents/MacOS/GraphicConverter 12” -convert “/MyImage.tif” — format PDF -to “/MyImage.pdf”

Unfortunately the pdf files being generated are always corrupt. Is there a way of doing it?

Also, is it possible to convert a multipage pdf to multiple JPGs files from the command line?

Much appreciated,
Laurent

Re: Terminal -convert command to .pdf format

Posted: Thu Feb 15, 2024 7:15 am
by forum_adm
The convert command supports only JPG, PNG and TIFF as written as error message in the console:
unsupported file format (JPG,PNG,TIF): PDF

Just create a batch within the browser that has a set format batch action.
You can call that conversion from the command line.

Usage of batch actions support splitting of PDF into separate JPGs.

Re: Terminal -convert command to .pdf format

Posted: Thu Feb 15, 2024 7:47 am
by forum_adm
I added now the additional supported formats: PDF, HEIC and AVIF to build 6420:
http://www.lemkesoft.org/beta.html

Re: [Solved] Terminal -convert command to .pdf format

Posted: Thu Feb 15, 2024 8:39 am
by forum_adm
Use the following batch for your second request:
Screenshot 2024-02-15 at 08.38.15.jpg
Screenshot 2024-02-15 at 08.38.15.jpg (120.77 KiB) Viewed 791 times

Re: [Solved] Terminal -convert command to .pdf format

Posted: Thu Feb 15, 2024 8:40 am
by forum_adm
and execute in the command line:

/path/gc12_build6420/GraphicConverter\ 12.app/Contents/MacOS/GraphicConverter\ 12 -batchconvert /path/sourcefolder -using /path/SaveAsJPG.gcaction -to /path/destfolder