Origami is a framework for PDF documents manipulation written in pure Ruby. It can be used to analyze or create malicious PDF documents. Being written in Ruby, the core engine of Origami is totally scriptable and can be used for automated tasks on large sets of documents. A GTK graphical interface is also available for manually browsing through the inner objects of a PDF document.
The Hacker News

The philosophy behind Origami is the following:
Support for both reading and writing to PDF documents. Origami is able to create documents from scratch, read existing documents and modify them. Each new feature added must be compatible with reading and writing.

Handling a large subset of the PDF specification. Origami focuses on features from the PDF specification which can be used to obfuscate documents or provide offensive capabilities. Being flexible and extensible. Origami can be used in many ways, even if you are new to the Ruby language.

Origami supports many advanced features of the PDF specification, such as:

  1. Compression filters and predictor functions
  2. Encryption
  3. Digital signatures
  4. Object streams
  5. File attachments
  6. AcroForms and XFA forms
  7. PDF actions and annotations (including Flash)
  8. Origami is open-source and distributed under the LGPL license.

New features
Here is the list of new features added in this version:

  1. Support for AES256 encryption/decryption of documents.
  2. Support for G3 unidimensional encoding/decoding of CCITTFax streams.
  3. Support for TIFF predictor functions.
  4. Enhanced support for Ruby 1.9.
  5. Can now be installed as a gem.
  6. Added methods for browsing pages and name trees.
  7. Added a Ruby shell for quick document analysis.
  8. Added a set of useful tools built upon Origami (pdfdecrypt, pdfencrypt, pdfdecompress, pdfextract, pdfmetadata, pdfcocoon, pdfcop, pdf2graph, pdf2ruby...)
  9. Lots of bug fixes.

Found this article interesting? Follow us on Twitter and LinkedIn to read more exclusive content we post.