Desktop

How to convert a PDF file to an image in command line of Linux

The command “convert” is used to do the job. You need to install ImageMagick suite of tools that are used to manipulate images.

The following command converts a PDF file myfile.pdf  to a JPG image.

[neo@techpulp ~]# convert myfile.pdf myfile.jpg

You can convert it to other image formats as well. For example, the following command converts the PDF to a PNG image file.

[neo@techpulp ~]# convert myfile.pdf myfile.png

The following command converts the PDF to a GIF image file.

[neo@techpulp ~]# convert myfile.pdf myfile.gif

How to open PDF files in Fedora/RHEL/Ubuntu Linux

Linux provides multiple options to open PDF files. If you are using GNOME as your desktop, ou can use “evince” application. If you are KDE fan, you can use “okular” application. Otherwise, you can try “xpdf” application as well.

If you are not sure about the name of Desktop you are using, just try all the commands at command-line and see if it works.

[neo@techpulp ~]# evince myfile.pdf
[neo@techpulp ~]# okular myfile.pdf
[neo@techpulp ~]# xpdf myfile.pdf

Typically you should have at least on of them installed in your system and should be able to open PDF files easily from the file manager.

You can use following More >