HexaPDF is a pure Ruby library with an accompanying application for working with PDF files. It supports Creating new PDF files, Manipulating existing PDF files,
Merging multiple PDF files into one, Extracting meta information, text, images and files from PDF files,
Securing PDF files by encrypting them and
optimizing PDF files for smaller file size or other criteria.