convert jpg to pdf ubuntu

How to convert JPG into PDF on Ubuntu Via Command Line

Another cool trick you can do with ubuntu, on ubuntu you can convert JPG file into PDF file, you can do this from the command line. This trick will help you to convert jpg to pdf vice-versa without using the Internet.

There is a command called ‘convert‘ on ubuntu that is used to convert lots of stuff, including JPG to PDF, but first, let’s install the ‘ImageMagick‘ package to make sure everything runs smoothly.

Steps to Convert jpg to pdf Ubuntu:

(1) Open Terminal and type below command.

sudo apt-get imagemagick

 convert jpg to pdf ubuntu

(2) Ones installed we are ready to convert JPG file and turn it into PDF file, you can use ‘convert‘ command like this:

convert [jpg file] [pdf file]

jpg to pdf on ubuntu

Also Read: How to convert the jpg to png on ubuntu using Terminal

(3) If you got an Error like @error/constitute.c/WriteImage/1037 then follow the step below to solve the error :

error

  • Open Terminal and type the Command cd/etc/ImageMagick-6/

cd/etc/ImageMagick-6/

  • Now type sudo gedit policy.xml and hit enter.

policy.xml

  • policy.xml file will open in gedit and now search for “PDF” word in the file.

convert pdf to png ubuntu using terminal

Also Read: Use wifi and Hotspot together in Android 

  • Now change this line <policy domain=”coder” rights=”none” pattern=”PDF” /> to <policy domain=”coder” rights=”read|write” pattern=”PDF” />  and save the file and exit the terminal.

convert png to pdf ubuntu

  • Now again try the convert command and you will not see any error.

Example:

convert image.jpg output.pdf
convert crazytechgo.jpg crazytechgo.pdf

(4) It is also possible to add multiple JPG files and converted into a single PDF file, here’s an example:

convert photo1.jpg photo2.jpg photo3.jpg photo-album.pdf

(5) We can also convert pdf file into jpg using the convert command  and the pdf file can be converted into any image extension like jpg , jpeg , png etc.

convert file.pdf img.jpg

png to pdf on ubuntu

jpg to pdf in ubuntu

 About Imagemagick :

ImageMagick is a free and open-source software suite for displaying, creating, converting, modifying, and editing images. Use of ImageMagick is to create, edit, compose, or save bitmap images. It can read and write images in a variety of formats, including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. You can also use ImageMagick to resizeflipmirror, rotate, distort, shear and transform images, etc.

The current release is ImageMagick 7.0.10-3. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and others.

6 comments

  1. Nice post. I learn something totally new and challenging on sites I stumbleupon on a daily basis. It’s always exciting to read through articles from other authors and use a little something from other web sites. |

  2. I know this site provides quality depending articles and additional information, is there any other web site which offers these stuff in quality?|

  3. I like the helpful info you supply for your articles. I’ll bookmark your blog and check once more here regularly. I’m fairly sure I’ll be told many new stuff proper here! Good luck for the next!

  4. Hi! Would you mind if I share your blog with my zynga group? There’s a lot of people that I think would really enjoy your content. Please let me know. Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *