There are very useful commands in imagemagick package to convert JPG to PDF.

convert *.jpg -auto-orient pictures.pdf

convert page1.jpg page2.jpg +compress file.pdf

Install imagemagick:

sudo apt-get install imagemagick

Be patient with images order. The order in PDF after converting could be random. Add numbers to the jog files names, like filename01.jpg...filename99.jpg etc.

If there is an error in coverting - check the permissions.
Add the string in file /etc/ImageMagick-7/policy.xml 

<policy domain="coder" rights="read | write" pattern="PDF" />

right after </policymap>

Add new comment

The content of this field is kept private and will not be shown publicly.
  • No HTML tags allowed.