Using Ghostscript to convert JPEG to PDF

https://gitlab.mister-muffin.de/josch/img2pdf

As mentioned by PleaseStand, GhostScript (edit: prior to v9.23) will decode the JPEG data, resulting in generation loss, as well as performance “ten to hundred” times worse than img2pdf.

Edit: Ghostscript 9.23 (2018-03-21) added a “JPEG Passthrough” capability that resolves the generation-loss/performance issue.

ImageMagick (i.e. convert) also decodes and re-encodes the images.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)