≡ Menu

portable document format

I get lots of e-bills (utility, telephone, Internet, mobile, cable and so on) in a PDF format for my small business and I need to forward those to my accountant. However, all PDFs files are password protected. I don't want to share my account password with anyone to just open my bills. Evince is a PDF document viewer capable of displaying password protected files but it cannot remove the password. How do I remove a password from all PDFs under Ubuntu or any other Linux distribution in a batch mode?
[click to continue…]

Q. How do I find out more information about Portable Document Format (PDF) document from a shell prompt? How do I find out information such as what software used to create a pdf file, its page size, and its creation date etc, using the terminal?
[click to continue…]

Question: I've downloaded configuration file in a PDF format. I do not have GUI installed on remote Linux / UNIX server. How do I convert a PDF (Portable Document Format) file to a text format using command line so that I can view file over remote ssh session?
[click to continue…]

Q. How do I extract images from a PDF file under Linux / UNIX shell account?
[click to continue…]

Howto Open a PDF file under Linux / FreeBSD

PDF is an acronym for Portable Document Format. It is a proprietary file format developed by Adobe Systems for representing two-dimensional documents in a device independent and resolution independent format. You can open pdf file using graphical as well as command line tools (i.e. without GUI). Linux supports following PDF viewer under X window:

  • Gnome pdf viewer (gpdf)
  • KDE pdf viewer (kpdf)
  • xpdf
  • Official Adobe acrobat reader

Graphic pdf viewer under Linux/FreeBSD

If you are using Gnome desktop...

Open a shell prompt and type the command:
$ gpdf file.pdf
$ evince file.pdf

If you are using KDE desktop...

Open a shell prompt and type the command:
$ kpdf file.pdf

You can also click on K icon > Select Graphics > Select PDF viewer

Console pdf viewer under Linux/FreeBSD

Console pdf viewer

As far as I know there is no console based PDF viewer exists. But you can use the following trick to open a PDF file:

a) First install pdftohtml - A command-line tool for converting pdf-files into html and other formats.

Debian User install pdftohtml using following command:
# apt-get install pdftohtml
Red Hat / Fedora user install pdftohtml using following command:
# yum install pdftohtml
FreeBSD user install pdftohtml using following command:
# pkg_add -v -r pdftohtml
OR use ports collection:
# cd /usr/ports/textproc/pdftohtml
# make; make install

The idea is very simple you will use a pdftohtml program to convert a PDF file into html, xml and png images and then display them using text browser such as elinks or lynx. This is useful when you works on remote server or if GUI is not available:
For example to convert CH09.PDF file you need to type the following set of commands:
$ pdftohtml CH09.PDF
$ lynx CH09.html

$ elinks CH09.html

You can also convert a PDF file to text file using following command:
$ pdftotext CH09.pdf
$ vi CH09.txt

See also

=> You can get Official Adobe acrobat reader here for UNIX/Linux oses.