RubyPDF Blog Open Source,PDF PoDoFo-an open source library that parse PDF files and modify their contents into memory

PoDoFo-an open source library that parse PDF files and modify their contents into memory

What is PoDoFo?

PoDoFo is a library to work with the PDF file format. The name comes from the first letter of PDF (Portable Document Format). A few tools to work with PDF files are already included in the PoDoFo package.

The PoDoFo library is a free, portable C++ library which includes classes to parse PDF files and modify their contents into memory. The changes can be written back to disk easily. The parser can also be used to extract information from a PDF file (for example the parser could be used in a PDF viewer). Besides parsing PoDoFo includes also very simple classes to create your own PDF files. All classes are documented so it is easy to start writing your own application using PoDoFo.

PoDoFo is written in C++ and the code was sucessfully compiled under Unix, Mac OS X and Windows.

Included Tools

The PoDoFo tools are simple tools build around the PoDoFo library. These tools are first of all examples on how to use the PoDoFo library in your own
projects. But secondly they offer also features for working with PDF files. More tools will come with future release and the existing tools will gain more features.
Currently there are the following tools:

  • podofoimgextract extracts all jpeg images from a given PDF file
  • podofouncompress removes all compression filters from a PDF file, this is useful for debugging existing PDF files
  • podofopdfinfo provides some basic info about a PDF – metadata, page details, etc.
  • podofotxt2pdf converts a text file to a PDF

Additionally there is the external tool PoDoFoBrowser which is not included in this package, but can be downloaded from the PoDoFo webpage. PoDoFoBrowser is a Qt application for browsing the objects in a PDF file and modifying their keys easily. It is very useful if you want to look on the internal structure of PDF files. Please take a look at the screenshots of PoDoFoBrowser in our gallery.

Requirements

To build PoDoFo you need besides a working GNU toolchain and a C++ compiler the following libraries:

  • fontconfig (Unix only)
  • freetype2
  • zlib
  • cmake (only for building PoDoFo)
  • libjpeg (optional)

Licensing

The PoDoFo library is licensed under the LGPL (i.e. you may even use the shared library in closed sourced applications). The tests and tools which are included in PoDoFo are licensed under the GPL. See the files COPYING and COPYING.LIB for details.

2 thoughts on “PoDoFo-an open source library that parse PDF files and modify their contents into memory”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.