[Solved] Terminal -convert command to .pdf format

Having tech problems? Post them here and do not worry, there is always a solution for you.
Post Reply
Laurent
Posts: 1
Joined: Thu Feb 15, 2024 6:08 am
Country: Australia

[Solved] Terminal -convert command to .pdf format

Post 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
User avatar
forum_adm
Site Admin
Posts: 1819
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Terminal -convert command to .pdf format

Post 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.
User avatar
forum_adm
Site Admin
Posts: 1819
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

Re: Terminal -convert command to .pdf format

Post by forum_adm »

I added now the additional supported formats: PDF, HEIC and AVIF to build 6420:
http://www.lemkesoft.org/beta.html
User avatar
forum_adm
Site Admin
Posts: 1819
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

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

Post 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 319 times
User avatar
forum_adm
Site Admin
Posts: 1819
Joined: Fri Dec 23, 2016 9:41 am
Location: Germany
Country: Germany
Contact:

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

Post 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
Post Reply