How can I create a customized version of an existing pdf file with node.js?

taxilian picture taxilian · Apr 28, 2013 · Viewed 16.1k times · Source

I have an old system that was written in PHP a long time ago that I would like to update to node.js to allow me to share code with a more modern system. Unfortunately, one of the main features of the PHP system is a tool that allows it to load an existing PDF file (which happens to be a government form), fill out the user's information, and provide a PDF to the browser that has all of that information present.

I have considered making a PHP script that will just do the PDF customization and using node for everything else, but it seems like something like this should be able to be done without requiring PHP to be installed.

Any idea how I might solve my problem just using node?

Answer

taxilian picture taxilian · Oct 19, 2014

After a lot of searching and nearly giving up, I did eventually find that the HummusJS library will do what I want to do!

Update April 2020: In the intervening years since I posted this other options have cropped up which look like they should work. Since this question still gets a lot of attention I thought I'd come back and update with some other options: