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.
 d8888b.  dP   dP   dP  dP         dP     dP   dP     dP 
`88 88 88 88 88 88 88 88 .d8'
.aaadP' 88 .8P .8P 88 88aaaaa88a 88aaa8P'
88' 88 d8' d8' 88 88 88 88 `8b.
88. 88.d8P8.d8P 88 88 88 88 88
Y88888P 8888' Y88' 88888888P dP dP dP dP

Enter the code depicted in ASCII art style.