Skip to content
gal kahana edited this page Mar 3, 2016 · 8 revisions

Hello and welcome to the Hummus Wiki.
Hummus is a NodeJS module for Creating, Parsing and Modifying PDF files and streams. Install by simply going "npm install hummus". Hummus is built on top of the PDFHummus library, a powerful, fast and free XPlatform C++ PDF library.

For sort of reference go to Features.

The module has the following set of features:

  1. Create new PDF files, Modify existing ones
  2. Display JPG and TIFF images. 1 BIT tiffs and grayscale may be used as image and color maps for fancy display.
  3. Show text using True Type, Open Type and Type 1 fonts (that's ttf,otf, pfb/pfm, dfont, ttc)
  4. Draw primitives
  5. Define reusable graphics using XObject Forms.
  6. Embed other PDF files into your PDF with many options around how to do that. From simple appending of pages from another PDF, through creating re-placable content out of pages from another PDF, to copying basic building blocks of the other PDF. And it's OK to merge and interleave content from multiple PDFs. no problem.
  7. Parse PDFs. At the high level - get basic info about the PDF file and it's pages. At the lower level - you get access to any of the low-level PDF building block.
  8. You can write to either file or stream. Particularly you can write directly to the response stream, saving you the need to maintain files for dynamically generated PDFs. You can implement your own custom streams
  9. You can also read JPGs, TIFFS, PDFs from custom streams implementations. natively the library supports files, but you don't have to stick just to that (unfortunately, fonts, at this point must still be files).

In addition to the high level features the module provides powerful access to the low level building blocks of the PDF in both reading and writing, so essentially you can do anything PDF.

It is also very fast, using a unique model of one-off writing.
And it is absolutely free. Apache 2 is the license, so you can use it safely for both commercial and non-commercial purposes.

Start with How to serve dynamically created pdf.
You can read more about the various features of the module in Features, leading from there to usage explanations and samples.

Any suggestions for additions are welcome. Contributions are also welcome (both in JS and C++).

Clone this wiki locally