6

Since ImageMagick's PDF abilities are broken ("not authorized" error) for some time with no solution in sight, what are the alternatives for converting images into PDF format right now?

I'm not interested in breaking the security as suggested numerous times in previous answers.

I use Ubuntu 18.04.3 LTS. I'm interested in converting common image formats (PNG, JPG) to PDF. I need a command line solution, like ImageMagick's convert tool, to be able to convert images in batches, in a scripted way.

Zanna
  • 69,223
  • 56
  • 216
  • 327
sor.rge
  • 162
  • 6
  • Which image file format? Which edition and release number of Ubuntu? Please click [edit] and put those essential facts in the Question. Please do not put them in a Comment. – K7AAY Jan 22 '20 at 19:17
  • Are there one or a few images, so that it is enough with a manual method or many images, so that you need some batch method? – sudodus Jan 22 '20 at 19:48
  • 1
    It seems that the [bug has been fixed](https://imagemagick.org/discourse-server/viewtopic.php?t=36287), and thus won't impact security any more. – vidarlo Jan 22 '20 at 20:10
  • https://askubuntu.com/questions/147679/adding-ocr-info-to-a-pdf – pierrely Jan 27 '20 at 04:38

1 Answers1

6
sudo apt install img2pdf
img2pdf -o document.pdf picture.jpg

lossless conversion of raster images to pdf

Multipage:

img2pdf -o document.pdf page1.jpg page2.jpg
artfulrobot
  • 8,413
  • 12
  • 64
  • 92