Create pdf of a jpg image in shell script

Dear Team,

Can any one please let me know, if there is any way to create pdf of a Jpg image file in shell script.

I work on Solaris, Korn Shell.

Currently we are using sunpcl2pdf.exe to create PDF from PCL(Printer Control Language) files.

But we are searching for some different way to create PDF to generate Invoice or other reporting information using records.There we need to put company logo in pdf. Logo is in jpg format.

Any solution will be very much helpful for me.

Many Thanks
Uttam Maji

the only way I know is install the imagemagick package

sudo apt-get install imagemagick

and then run

convert image1.jpg image1.pdf

Obviously apt-get will not be available on Solaris so you may need to download and compile the source.

Also note that imagemagick has been replaced with the newer (faster and better) graphicsmagick, you can see install instructions and download the source from Installing GraphicsMagick

The commands are very similar to imagemagick and typically just involve appending a gm eg:

gm convert image1.jpg image.pdf