Using Ghostscript to convert JPEG to PDF
What are the parameters that I should pass? The Ghostscript version I'm using is 8.71. Henry gs \ -sDEVICE=pdfwrite \ -o foo.pdf \ /usr/local/share/ghostscript/8.71/lib/viewjpeg.ps \ -c \(my.jpg\) viewJPEG reads my.jpg and produces foo.pdf . You will have to find where your installation installed the PostScript program viewjpeg.ps . https://gitlab.mister-muffin.de/josch/img2pdf As mentioned by PleaseStand, GhostScript will decode the JPEG data, resulting in generation loss , as well as performance "ten to hundred" times worse than img2pdf. ImageMagick (i.e. convert ) also decodes and re