-
Notifications
You must be signed in to change notification settings - Fork 170
Home
gal kahana edited this page Sep 10, 2017
·
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
.
The module has the following set of features:
- Create new PDF files, Modify existing ones.
- Display JPG, PNG and TIFF images. 1 BIT tiffs and grayscale may be used as image and color maps for fancy display. Transparent PNG images are supported.
- Show text using True Type, Open Type and Type 1 fonts (that's ttf,otf, pfb/pfm, dfont, ttc).
- Draw primitives.
- Define reusable graphics using XObject Forms.
- 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.
- Parse PDFs
- When modifying a PDF you can add new pages to it with new content, or place content on top of existing page content. And much more - for example this explains how to fill PDF forms with modification.
- 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
- 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.
Getting Started - How to serve dynamically created pdf.
Feature documentation and Reference - Features.
Hummus is also very fast, using a unique model of one-off writing.
It is built on top of the PDFHummus library, a powerful, fast and free XPlatform C++ PDF library.
It is absolutely free. Apache 2 is the license, so you can use it safely for both commercial and non-commercial purposes.
Any suggestions for additions are welcome. Contributions are also welcome (both in JS and C++).