How to install QPDF on Centos 6?

I have been working with PDF files for many years, and use this document format for exchanging documents with clients, friends and various people. I prefer PDF over MS Word due to its portability and non-commercial status. There are various tools available to produce PDFs, split & merge, password protect permissions and PDF documents, and transform from one version to another.

I have been tasked to create a PDF file from PHP scripting language, and password protect the document for email transmission. There are a number of permission settings to consider with owner password, and also add open or user password for restricting a user from opening a document. All those permissions, passwords and properties are stored within a PDF file, and if you have to change those properties you'll have to transform a PDF to another version and QPDF can help.

What is QPDF?

QPDF is a command-line program that transforms one PDF file to another PDF file. QPDF is capable of creating linearized (also known as web-optimized) files and encrypt or decrypt PDF files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them. QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor.

How to install QPDF on Centos 6?

There is no official QPDF RPM available on Centos distro, and therefore we need to build it ourselves. It's fairly easy to build on Centos or Red Hat platform, though once you have installed required software modules. QPDF relies on zlib and pecl, and gcc and gcc-c++ to compile, so we need to install them.

// Login as a root user.
# yum install zlib-devel pcre-devel gcc gcc-c++
// Download QPDF from Sourceforge, and unpack in a directory
# ./configure
# make
# make install
Tags: 

Comments

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.