Form fill wrapper around PDFtk's implementation using streams
npm install pdftk-formfill
var fs = require('fs');
var pdftkFormFill = require('PDFtkFormFill');
var outputPath = './output.pdf';
var sampleData = {
...
};
pdftkFormFill('./sample.pdf', sampleData, function(err, out, code){
fs.writeFile(outputPath, out, function(err) {
if(err) {
return console.log(err);
}
console.log("The file was saved!");
});
});
Copyright (c) 2015 Hady Osman
Licensed under the MIT license.