QPDF


QPDF is a free command-line program that can convert one PDF file to another equivalent PDF file. It is capable of performing a variety of transformations such as linearization, encryption, and decryption of PDF files. It also has many options for inspecting or checking PDF files, some of which are useful primarily to PDF developers. QPDF includes support for rotating, merging and splitting PDFs through the ability to copy objects from one PDF file into another and to manipulate the list of pages in a PDF file.
The QPDF library also makes it possible to create PDF files from scratch. In this mode, the user is responsible for supplying all the contents of the file, while the QPDF library takes care of the syntactical representation of the objects, creation of cross references tables and, optionally, object streams, encryption, linearization, and other syntactic details.