Giter Club home page Giter Club logo

pdf-fill-form's Introduction


PDF Fill Form (pdf-fill-form) is Node.js native C++ library for filling PDF forms. Created PDF file is returned back as Node.js Buffer object for further processing or saving - whole process is done in memory. Library offers methods to return filled PDF also as PDF file where pages are converted to images.

Library uses internally Poppler QT5 for PDF form reading and filling. Cairo is used for PDF creation from page images (when parameter { "save": "imgpdf" } is used).

Features

  • Supports reading and writing the following PDF form field types: TextField, Checkbox, and Radio button

  • You can write following files:

    • PDF
    • PDF where pages are converted to images
  • All the work is done in memory - no temporary files created

  • Results are returned in Node.js Buffer -object

  • Not using the PDFtk -executable - instead we use the Poppler library

Examples

Using promises

Read from file

var pdfFillForm = require('pdf-fill-form');

pdfFillForm.read('test.pdf')
.then(function(result) {
    console.log(result);
}, function(err) {
	console.log(err);
});

Read from file buffer

var pdfFillForm = require('pdf-fill-form');

pdfFillForm.readBuffer(fs.readFileSync('test.pdf'))
.then(function(result) {
    console.log(result);
}, function(err) {
	console.log(err);
});

Write from file

var pdfFillForm = require('pdf-fill-form');
var fs = require('fs');

pdfFillForm.write('test.pdf', { "myField": "myField fill value" }, { "save": "pdf", 'cores': 4, 'scale': 0.2, 'antialias': true } )
.then(function(result) {
	fs.writeFile("test123.pdf", result, function(err) {
		if(err) {
	   		return console.log(err);
	   	}
	   	console.log("The file was saved!");
	}); 
}, function(err) {
  	console.log(err);
});

Write from file buffer

var pdfFillForm = require('pdf-fill-form');
var fs = require('fs');

pdfFillForm.writeBuffer(fs.readFileSync('test.pdf'), { "myField": "myField fill value" }, { "save": "pdf", 'cores': 4, 'scale': 0.2, 'antialias': true } )
.then(function(result) {
	fs.writeFile("test123.pdf", result, function(err) {
		if(err) {
	   		return console.log(err);
	   	}
	   	console.log("The file was saved!");
	}); 
}, function(err) {
  	console.log(err);
});

Using callbacks

To read all form fields:

var pdfFillForm = require('pdf-fill-form');

var pdfFields = pdfFillForm.readSync('test.pdf');
console.log(pdfFields);

To write form fields (synchronous) to PDF:

var pdfFillForm = require('pdf-fill-form');
var fs = require('fs');

// Use here the field names you got from read
var pdf = pdfFillForm.writeSync('test.pdf', 
	{ "myField": "myField fill value" }, { "save": "pdf" } );
fs.writeFileSync('filled_test.pdf', pdf);

To write form fields (aynchronous) to PDF:

var pdfFillForm = require('pdf-fill-form');
var fs = require('fs');

// Use here the field names you got from read
pdfFillForm.writeAsync('test.pdf', 
	{ "myField": "myField fill value" }, { "save": "pdf" }, 
	function(err, pdf) {
		fs.writeFile("filled_test.pdf", pdf, function(err){});
	}
);

To write form fields to PDF where pages are converted to images:

Use parameter { "save": "imgpdf" }

Notes about using radio buttons (@mttchrry)

Just set the radio button field Value to the caption of the item you want to select.

For example if you have a radio button for gender called "Gender1" with options captioned as "Male" or "Female" then passing in the field {"Gender1": "Male"} will select the male radio button, as expected.

Installation

macOS

Preferable method to install library dependencies is via Homebrew

First, make sure the XCode Command Line Tools are installed correctly

xcode-select --install

Also make sure pkg-config is installed correctly

brew install pkg-config

Then install the Poppler and Cairo formulae using brew

NB: Poppler contains all the necessary qt version 5 depencencies.

brew install poppler cairo

Also export environment variables used by the compiler during the pdf-fill-form installation

export LDFLAGS=-L/usr/local/opt/qt/lib
export CPPFLAGS=-I/usr/local/opt/qt/include
export PKG_CONFIG_PATH=/usr/local/opt/qt/lib/pkgconfig

NB: You may also append the above export commands to your ~/.bash_profile or ~/.zshrc file for persistency.

Finally, install the package using npm or yarn

$ npm install pdf-fill-form
$ yarn add pdf-fill-form

Troubleshooting

Homebrew users who get error regarding xcb-shm
The fix is to add this to your bash profile / environment: export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig

Linux - Ubuntu (trusty)

$ sudo apt-get install libpoppler-qt5-dev libcairo2-dev
$ npm install pdf-fill-form

Linux - Debian (jessie)

To be sure to have the required packages, re-synchronize the package index files from their sources :

$ sudo apt-get update

Then install packages :

$ sudo apt-get install libcairo2-dev libpoppler-qt5-dev 
$ npm install pdf-fill-form

I mostly recommand to install this package to have better support with fonts :

$ sudo apt-get install poppler-data

Linux - CENTOS 8

First, enable the PowerTools repository :

$ yum config-manager --set-enabled PowerTools

Install the dependencies :

$ dnf install poppler-qt5-devel cairo cairo-devel

Then install the package using npm or yarn :

$ npm install pdf-fill-form
$ yarn add pdf-fill-form

Windows

Not currently supported

Todo

  • Tests
  • Refactoring
  • Support for other form field types than TextField, Checkbox, and Radio button

Changelog

v5.1.0 (15.3.2021)

  • Fix the v8 namespace (by @gedaiu)

v5.0.0 (6.11.2019)

  • New options startPage and endPage for the imgpdf feature to limit which pages are generated. Page numbers indexed from 0 (by Derick Naef @ochimo).
  • Allow source to come in a buffer an not a filename (by Dustin Harmon @dfharmon)
  • Support for Node 13 (by @florianbepunkt)

v4.1.0 (10.9.2018)

  • Support for Node 10 (by @florianbepunkt)

v4.0.0 (14.12.2017)

  • #45 Set radio button "value" to the poppler button state (by Albert Astals Cid @tsdgeos)
  • Added feature allowing for parallelization of the imgpdf feature, also allows for settings scale and whether antialiasing should be used (by Albert Astals Cid @tsdgeos).

v3.3.0 (14.12.2017)

  • #49 Set radio button "value" to the poppler button state (by Mihai Saru @MitzaCoder)

v3.2.0 (24.5.2017)

  • Support for radio buttons (by Matt Cherry @mttchrry)

Authors

Contibutors

  • Ethan Goldblum
  • Tyler Iguchi
  • Rob Davarnia
  • Fabrice Ongenae
  • Juwan Yoo
  • Andreas Gruenbacher
  • Andrei Dracea
  • Emil Sedgh
  • Matt Cherry
  • Mario Ferreira
  • Mihai Saru @MitzaCoder
  • Albert Astals Cid @tsdgeos
  • Florian Bischoff @florianbepunkt
  • Derick Naef @ochimo
  • Dustin Harmon @dfharmon
  • Szabo Bogdan @gedaiu

License

MIT

NOTE ABOUT LIBRARY DEPENDENCIES! Poppler has GPL license. Cairo has LGPL.

pdf-fill-form's People

Contributors

andreas-gruenbacher avatar derekwheee avatar egoldblum avatar emilsedgh avatar florianbepunkt avatar jybleau avatar mitzacoder avatar mttchrry avatar psyanite avatar robdvr avatar tpisto avatar tsdgeos avatar tyleriguchi avatar vhain avatar ztrange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdf-fill-form's Issues

Having an issue with data actually appearing

So I have a PDF to which I am writing a simple subset of data. PDF is attached. I am able to render the data fine, but whenever I view the PDF itself, the form field appears empty until you click in the field The data then appears, but until you actually change the data, the content of the field remains empty.

If I view the PDF with a browser instead of acrobat, no data appears. I've also tried using the save : imgpdf option, but no data is placed into the field. Just trying to figure out what happened as this same process worked flawlessly for us in the previous year.

f1095c.pdf

Filling forms with non-ascii symbols doesn't work

This code:

var pdf = pdfFillForm.writeSync('1.pdf',
	{ "fill_1": " \u03A9" }, { "save": "pdf" } );
var pdf = pdfFillForm.writeSync(1.pdf',
	{ "fill_1": "Ё" }, { "save": "pdf" } );

failed with errors:

"Error: AnnotWidget::layoutText, cannot convert U+03A9"
"Error: AnnotWidget::layoutText, cannot convert U+0401"

Error installing on Mac

Got these errors during npm install:

[email protected] install /Users/jack/node-playground/test-pdf/node_modules/pdf-fill-form
node-gyp rebuild

CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePopplerAsync.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePoppler.o
../src/NodePoppler.cc:9:10: fatal error: 'poppler/qt4/poppler-form.h' file not found

include <poppler/qt4/poppler-form.h>

     ^

1 error generated.
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jack/node-playground/test-pdf/node_modules/pdf-fill-form
gyp ERR! node -v v6.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pdf-fill-form" "--save"
npm ERR! node v6.0.0
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pdf-fill-form
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/jack/node-playground/test-pdf/npm-debug.log

Here's the npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'pdf-fill-form',
1 verbose cli '--save' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData pdf-fill-form
8 silly fetchNamedPackageData pdf-fill-form
9 silly mapToRegistry name pdf-fill-form
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry http://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'pdf-fill-form',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: 'pdf-fill-form',
12 silly mapToRegistry name: 'pdf-fill-form',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri http://registry.npmjs.org/pdf-fill-form
14 verbose request uri http://registry.npmjs.org/pdf-fill-form
15 verbose request no auth needed
16 info attempt registry request try #1 at 2:24:53 PM
17 verbose request id 47bf08e712c1afe8
18 verbose etag "CP7JNONECEUPYZ1WSMRJ4KG8A"
19 http request GET http://registry.npmjs.org/pdf-fill-form
20 http 304 http://registry.npmjs.org/pdf-fill-form
21 verbose headers { date: 'Sat, 30 Jul 2016 06:24:53 GMT',
21 verbose headers via: '1.1 varnish',
21 verbose headers 'cache-control': 'max-age=300',
21 verbose headers etag: '"CP7JNONECEUPYZ1WSMRJ4KG8A"',
21 verbose headers age: '180',
21 verbose headers connection: 'keep-alive',
21 verbose headers 'x-served-by': 'cache-hkg6821-HKG',
21 verbose headers 'x-cache': 'HIT',
21 verbose headers 'x-cache-hits': '1',
21 verbose headers 'x-timer': 'S1469859893.999833,VS0,VE0',
21 verbose headers vary: 'Accept-Encoding' }
22 silly get cb [ 304,
22 silly get { date: 'Sat, 30 Jul 2016 06:24:53 GMT',
22 silly get via: '1.1 varnish',
22 silly get 'cache-control': 'max-age=300',
22 silly get etag: '"CP7JNONECEUPYZ1WSMRJ4KG8A"',
22 silly get age: '180',
22 silly get connection: 'keep-alive',
22 silly get 'x-served-by': 'cache-hkg6821-HKG',
22 silly get 'x-cache': 'HIT',
22 silly get 'x-cache-hits': '1',
22 silly get 'x-timer': 'S1469859893.999833,VS0,VE0',
22 silly get vary: 'Accept-Encoding' } ]
23 verbose etag http://registry.npmjs.org/pdf-fill-form from cache
24 verbose get saving pdf-fill-form to /Users/jack/.npm/registry.npmjs.org/pdf-fill-form/.cache.json
25 verbose correctMkdir /Users/jack/.npm correctMkdir not in flight; initializing
26 silly install normalizeTree
27 silly loadCurrentTree Finishing
28 silly loadIdealTree Starting
29 silly install loadIdealTree
30 silly cloneCurrentTree Starting
31 silly install cloneCurrentTreeToIdealTree
32 silly cloneCurrentTree Finishing
33 silly loadShrinkwrap Starting
34 silly install loadShrinkwrap
35 silly loadShrinkwrap Finishing
36 silly loadAllDepsIntoIdealTree Starting
37 silly install loadAllDepsIntoIdealTree
38 silly resolveWithNewModule [email protected] checking installable status
39 silly cache add args [ 'pdf-fill-form', null ]
40 verbose cache add spec pdf-fill-form
41 silly cache add parsed spec Result {
41 silly cache add raw: 'pdf-fill-form',
41 silly cache add scope: null,
41 silly cache add escapedName: 'pdf-fill-form',
41 silly cache add name: 'pdf-fill-form',
41 silly cache add rawSpec: '',
41 silly cache add spec: 'latest',
41 silly cache add type: 'tag' }
42 silly addNamed pdf-fill-form@latest
43 verbose addNamed "latest" is being treated as a dist-tag for pdf-fill-form
44 info addNameTag [ 'pdf-fill-form', 'latest' ]
45 silly mapToRegistry name pdf-fill-form
46 silly mapToRegistry using default registry
47 silly mapToRegistry registry http://registry.npmjs.org/
48 silly mapToRegistry data Result {
48 silly mapToRegistry raw: 'pdf-fill-form',
48 silly mapToRegistry scope: null,
48 silly mapToRegistry escapedName: 'pdf-fill-form',
48 silly mapToRegistry name: 'pdf-fill-form',
48 silly mapToRegistry rawSpec: '',
48 silly mapToRegistry spec: 'latest',
48 silly mapToRegistry type: 'tag' }
49 silly mapToRegistry uri http://registry.npmjs.org/pdf-fill-form
50 verbose addNameTag registry:http://registry.npmjs.org/pdf-fill-form not in flight; fetching
51 verbose get http://registry.npmjs.org/pdf-fill-form not expired, no request
52 silly addNameTag next cb for pdf-fill-form with tag latest
53 silly addNamed [email protected]
54 verbose addNamed "2.0.0" is a plain semver version for pdf-fill-form
55 silly cache afterAdd [email protected]
56 verbose afterAdd /Users/jack/.npm/pdf-fill-form/2.0.0/package/package.json not in flight; writing
57 verbose correctMkdir /Users/jack/.npm correctMkdir not in flight; initializing
58 verbose afterAdd /Users/jack/.npm/pdf-fill-form/2.0.0/package/package.json written
59 silly fetchNamedPackageData nan
60 silly mapToRegistry name nan
61 silly mapToRegistry using default registry
62 silly mapToRegistry registry http://registry.npmjs.org/
63 silly mapToRegistry data Result {
63 silly mapToRegistry raw: 'nan',
63 silly mapToRegistry scope: null,
63 silly mapToRegistry escapedName: 'nan',
63 silly mapToRegistry name: 'nan',
63 silly mapToRegistry rawSpec: '',
63 silly mapToRegistry spec: 'latest',
63 silly mapToRegistry type: 'tag' }
64 silly mapToRegistry uri http://registry.npmjs.org/nan
65 verbose request uri http://registry.npmjs.org/nan
66 verbose request no auth needed
67 info attempt registry request try #1 at 2:24:54 PM
68 verbose etag "EGTR1APXEV7TH8V3QYT0WN357"
69 http request GET http://registry.npmjs.org/nan
70 http 304 http://registry.npmjs.org/nan
71 verbose headers { date: 'Sat, 30 Jul 2016 06:24:54 GMT',
71 verbose headers via: '1.1 varnish',
71 verbose headers 'cache-control': 'max-age=300',
71 verbose headers etag: '"EGTR1APXEV7TH8V3QYT0WN357"',
71 verbose headers age: '132',
71 verbose headers connection: 'keep-alive',
71 verbose headers 'x-served-by': 'cache-hkg6821-HKG',
71 verbose headers 'x-cache': 'HIT',
71 verbose headers 'x-cache-hits': '55',
71 verbose headers 'x-timer': 'S1469859894.154579,VS0,VE0',
71 verbose headers vary: 'Accept-Encoding' }
72 silly get cb [ 304,
72 silly get { date: 'Sat, 30 Jul 2016 06:24:54 GMT',
72 silly get via: '1.1 varnish',
72 silly get 'cache-control': 'max-age=300',
72 silly get etag: '"EGTR1APXEV7TH8V3QYT0WN357"',
72 silly get age: '132',
72 silly get connection: 'keep-alive',
72 silly get 'x-served-by': 'cache-hkg6821-HKG',
72 silly get 'x-cache': 'HIT',
72 silly get 'x-cache-hits': '55',
72 silly get 'x-timer': 'S1469859894.154579,VS0,VE0',
72 silly get vary: 'Accept-Encoding' } ]
73 verbose etag http://registry.npmjs.org/nan from cache
74 verbose get saving nan to /Users/jack/.npm/registry.npmjs.org/nan/.cache.json
75 verbose correctMkdir /Users/jack/.npm correctMkdir not in flight; initializing
76 silly resolveWithNewModule [email protected] checking installable status
77 silly cache add args [ 'nan@2.4.0', null ]
78 verbose cache add spec nan@2.4.0
79 silly cache add parsed spec Result {
79 silly cache add raw: 'nan@2.4.0',
79 silly cache add scope: null,
79 silly cache add escapedName: 'nan',
79 silly cache add name: 'nan',
79 silly cache add rawSpec: '2.4.0',
79 silly cache add spec: '>=2.4.0 <2.5.0',
79 silly cache add type: 'range' }
80 silly addNamed nan@>=2.4.0 <2.5.0
81 verbose addNamed ">=2.4.0 <2.5.0" is a valid semver range for nan
82 silly addNameRange { name: 'nan', range: '>=2.4.0 <2.5.0', hasData: false }
83 silly mapToRegistry name nan
84 silly mapToRegistry using default registry
85 silly mapToRegistry registry http://registry.npmjs.org/
86 silly mapToRegistry data Result {
86 silly mapToRegistry raw: 'nan',
86 silly mapToRegistry scope: null,
86 silly mapToRegistry escapedName: 'nan',
86 silly mapToRegistry name: 'nan',
86 silly mapToRegistry rawSpec: '',
86 silly mapToRegistry spec: 'latest',
86 silly mapToRegistry type: 'tag' }
87 silly mapToRegistry uri http://registry.npmjs.org/nan
88 verbose addNameRange registry:http://registry.npmjs.org/nan not in flight; fetching
89 verbose get http://registry.npmjs.org/nan not expired, no request
90 silly addNameRange number 2 { name: 'nan', range: '>=2.4.0 <2.5.0', hasData: true }
91 silly addNameRange versions [ 'nan',
91 silly addNameRange [ '0.3.0-wip',
91 silly addNameRange '0.3.0-wip2',
91 silly addNameRange '0.3.0',
91 silly addNameRange '0.3.1',
91 silly addNameRange '0.3.2',
91 silly addNameRange '0.4.0',
91 silly addNameRange '0.4.1',
91 silly addNameRange '0.4.2',
91 silly addNameRange '0.4.3',
91 silly addNameRange '0.4.4',
91 silly addNameRange '0.5.0',
91 silly addNameRange '0.5.1',
91 silly addNameRange '0.5.2',
91 silly addNameRange '0.6.0',
91 silly addNameRange '0.7.0',
91 silly addNameRange '0.7.1',
91 silly addNameRange '0.8.0',
91 silly addNameRange '1.0.0',
91 silly addNameRange '1.1.0',
91 silly addNameRange '1.1.1',
91 silly addNameRange '1.1.2',
91 silly addNameRange '1.2.0',
91 silly addNameRange '1.3.0',
91 silly addNameRange '1.4.0',
91 silly addNameRange '1.4.1',
91 silly addNameRange '1.5.0',
91 silly addNameRange '1.4.2',
91 silly addNameRange '1.4.3',
91 silly addNameRange '1.5.1',
91 silly addNameRange '1.5.2',
91 silly addNameRange '1.6.0',
91 silly addNameRange '1.5.3',
91 silly addNameRange '1.6.1',
91 silly addNameRange '1.6.2',
91 silly addNameRange '1.7.0',
91 silly addNameRange '1.8.0',
91 silly addNameRange '1.8.1',
91 silly addNameRange '1.8.2',
91 silly addNameRange '1.8.3',
91 silly addNameRange '1.8.4',
91 silly addNameRange '1.9.0',
91 silly addNameRange '2.0.0',
91 silly addNameRange '2.0.1',
91 silly addNameRange '2.0.2',
91 silly addNameRange '2.0.3',
91 silly addNameRange '2.0.4',
91 silly addNameRange '2.0.5',
91 silly addNameRange '2.0.6',
91 silly addNameRange '2.0.7',
91 silly addNameRange '2.0.8',
91 silly addNameRange '2.0.9',
91 silly addNameRange '2.1.0',
91 silly addNameRange '2.2.0',
91 silly addNameRange '2.2.1',
91 silly addNameRange '2.3.0',
91 silly addNameRange '2.3.1',
91 silly addNameRange '2.3.2',
91 silly addNameRange '2.3.3',
91 silly addNameRange '2.3.4',
91 silly addNameRange '2.3.5',
91 silly addNameRange '2.4.0' ] ]
92 silly addNamed [email protected]
93 verbose addNamed "2.4.0" is a plain semver version for nan
94 silly cache afterAdd [email protected]
95 verbose afterAdd /Users/jack/.npm/nan/2.4.0/package/package.json not in flight; writing
96 verbose correctMkdir /Users/jack/.npm correctMkdir not in flight; initializing
97 verbose afterAdd /Users/jack/.npm/nan/2.4.0/package/package.json written
98 silly loadAllDepsIntoIdealTree Finishing
99 silly loadIdealTree Finishing
100 silly currentTree [email protected]
101 silly idealTree [email protected]
101 silly idealTree ├── [email protected]
101 silly idealTree └── [email protected]
102 silly generateActionsToTake Starting
103 silly install generateActionsToTake
104 silly generateActionsToTake Finishing
105 silly diffTrees action count 2
106 silly diffTrees add [email protected]
107 silly diffTrees add [email protected]
108 silly decomposeActions action count 16
109 silly decomposeActions fetch [email protected]
110 silly decomposeActions extract [email protected]
111 silly decomposeActions test [email protected]
112 silly decomposeActions preinstall [email protected]
113 silly decomposeActions build [email protected]
114 silly decomposeActions install [email protected]
115 silly decomposeActions postinstall [email protected]
116 silly decomposeActions finalize [email protected]
117 silly decomposeActions fetch [email protected]
118 silly decomposeActions extract [email protected]
119 silly decomposeActions test [email protected]
120 silly decomposeActions preinstall [email protected]
121 silly decomposeActions build [email protected]
122 silly decomposeActions install [email protected]
123 silly decomposeActions postinstall [email protected]
124 silly decomposeActions finalize [email protected]
125 silly executeActions Starting
126 silly install executeActions
127 silly doSerial global-install 0
128 silly doParallel fetch 2
129 verbose correctMkdir /Users/jack/.npm/_locks correctMkdir not in flight; initializing
130 verbose lock using /Users/jack/.npm/_locks/staging-a858603dceb08c51.lock for /Users/jack/node-playground/test-pdf/node_modules/.staging
131 silly doParallel extract 2
132 silly extract [email protected]
133 silly extract [email protected]
134 verbose unbuild node_modules/.staging/nan-4bd6079c
135 verbose unbuild node_modules/.staging/pdf-fill-form-5c0a5a35
136 silly gentlyRm /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c is being purged from base /Users/jack/node-playground/test-pdf
137 verbose gentlyRm don't care about contents; nuking /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c
138 silly gentlyRm /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35 is being purged from base /Users/jack/node-playground/test-pdf
139 verbose gentlyRm don't care about contents; nuking /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35
140 verbose tar unpack /Users/jack/.npm/nan/2.4.0/package.tgz
141 verbose tar unpacking to /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c
142 silly gentlyRm /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c is being purged
143 verbose gentlyRm don't care about contents; nuking /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c
144 verbose tar unpack /Users/jack/.npm/pdf-fill-form/2.0.0/package.tgz
145 verbose tar unpacking to /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35
146 silly gentlyRm /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35 is being purged
147 verbose gentlyRm don't care about contents; nuking /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35
148 silly gunzTarPerm modes [ '755', '644' ]
149 silly gunzTarPerm modes [ '755', '644' ]
150 silly gunzTarPerm extractEntry package.json
151 silly gunzTarPerm modified mode [ 'package.json', 436, 420 ]
152 silly gunzTarPerm extractEntry package.json
153 silly gunzTarPerm extractEntry README.md
154 silly gunzTarPerm modified mode [ 'README.md', 436, 420 ]
155 silly gunzTarPerm extractEntry .npmignore
156 silly gunzTarPerm extractEntry README.md
157 silly gunzTarPerm extractEntry include_dirs.js
158 silly gunzTarPerm modified mode [ 'include_dirs.js', 436, 420 ]
159 silly gunzTarPerm extractEntry LICENSE
160 silly gunzTarPerm extractEntry example.js
161 silly gunzTarPerm extractEntry nan_callbacks_pre_12_inl.h
162 silly gunzTarPerm modified mode [ 'nan_callbacks_pre_12_inl.h', 436, 420 ]
163 silly gunzTarPerm extractEntry CHANGELOG.md
164 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 420 ]
165 silly gunzTarPerm extractEntry LICENSE.md
166 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 420 ]
167 silly gunzTarPerm extractEntry doc/node_misc.md
168 silly gunzTarPerm modified mode [ 'doc/node_misc.md', 436, 420 ]
169 silly gunzTarPerm extractEntry binding.gyp
170 silly gunzTarPerm extractEntry lib/pdf-fill-form.js
171 silly gunzTarPerm extractEntry doc/asyncworker.md
172 silly gunzTarPerm modified mode [ 'doc/asyncworker.md', 436, 420 ]
173 silly gunzTarPerm extractEntry doc/callback.md
174 silly gunzTarPerm modified mode [ 'doc/callback.md', 436, 420 ]
175 silly gunzTarPerm extractEntry src/NodePoppler.cc
176 silly gunzTarPerm extractEntry src/NodePoppler.h
177 silly gunzTarPerm extractEntry src/NodePopplerAsync.cc
178 silly gunzTarPerm extractEntry src/NodePopplerAsync.h
179 silly gunzTarPerm extractEntry src/pdf-fill-form.cc
180 silly gunzTarPerm extractEntry doc/converters.md
181 silly gunzTarPerm modified mode [ 'doc/converters.md', 436, 420 ]
182 silly gunzTarPerm extractEntry doc/errors.md
183 silly gunzTarPerm modified mode [ 'doc/errors.md', 436, 420 ]
184 silly gunzTarPerm extractEntry doc/maybe_types.md
185 silly gunzTarPerm modified mode [ 'doc/maybe_types.md', 436, 420 ]
186 silly gunzTarPerm extractEntry doc/methods.md
187 silly gunzTarPerm modified mode [ 'doc/methods.md', 436, 420 ]
188 silly gunzTarPerm extractEntry doc/new.md
189 silly gunzTarPerm modified mode [ 'doc/new.md', 436, 420 ]
190 silly gunzTarPerm extractEntry doc/buffers.md
191 silly gunzTarPerm modified mode [ 'doc/buffers.md', 436, 420 ]
192 silly gunzTarPerm extractEntry doc/object_wrappers.md
193 silly gunzTarPerm modified mode [ 'doc/object_wrappers.md', 436, 420 ]
194 silly gunzTarPerm extractEntry doc/persistent.md
195 silly gunzTarPerm modified mode [ 'doc/persistent.md', 436, 420 ]
196 silly gunzTarPerm extractEntry doc/scopes.md
197 silly gunzTarPerm modified mode [ 'doc/scopes.md', 436, 420 ]
198 silly gunzTarPerm extractEntry doc/script.md
199 silly gunzTarPerm modified mode [ 'doc/script.md', 436, 420 ]
200 silly gunzTarPerm extractEntry doc/string_bytes.md
201 silly gunzTarPerm modified mode [ 'doc/string_bytes.md', 436, 420 ]
202 silly gunzTarPerm extractEntry doc/v8_internals.md
203 silly gunzTarPerm modified mode [ 'doc/v8_internals.md', 436, 420 ]
204 silly gunzTarPerm extractEntry doc/v8_misc.md
205 silly gunzTarPerm modified mode [ 'doc/v8_misc.md', 436, 420 ]
206 silly gunzTarPerm extractEntry nan.h
207 silly gunzTarPerm modified mode [ 'nan.h', 436, 420 ]
208 silly gunzTarPerm extractEntry nan_callbacks.h
209 silly gunzTarPerm modified mode [ 'nan_callbacks.h', 436, 420 ]
210 silly gunzTarPerm extractEntry nan_callbacks_12_inl.h
211 silly gunzTarPerm modified mode [ 'nan_callbacks_12_inl.h', 436, 420 ]
212 silly gunzTarPerm extractEntry nan_converters.h
213 silly gunzTarPerm modified mode [ 'nan_converters.h', 436, 420 ]
214 silly gunzTarPerm extractEntry nan_converters_43_inl.h
215 silly gunzTarPerm modified mode [ 'nan_converters_43_inl.h', 436, 420 ]
216 silly gunzTarPerm extractEntry nan_converters_pre_43_inl.h
217 silly gunzTarPerm modified mode [ 'nan_converters_pre_43_inl.h', 436, 420 ]
218 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
219 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 420 ]
220 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
221 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 420 ]
222 silly gunzTarPerm extractEntry nan_maybe_43_inl.h
223 silly gunzTarPerm modified mode [ 'nan_maybe_43_inl.h', 436, 420 ]
224 silly gunzTarPerm extractEntry nan_maybe_pre_43_inl.h
225 silly gunzTarPerm modified mode [ 'nan_maybe_pre_43_inl.h', 436, 420 ]
226 silly gentlyRm /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35/node_modules is being purged
227 verbose gentlyRm don't care about contents; nuking /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35/node_modules
228 silly gunzTarPerm extractEntry nan_new.h
229 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 420 ]
230 silly gunzTarPerm extractEntry nan_object_wrap.h
231 silly gunzTarPerm modified mode [ 'nan_object_wrap.h', 436, 420 ]
232 silly gunzTarPerm extractEntry nan_persistent_12_inl.h
233 silly gunzTarPerm modified mode [ 'nan_persistent_12_inl.h', 436, 420 ]
234 silly gunzTarPerm extractEntry nan_persistent_pre_12_inl.h
235 silly gunzTarPerm modified mode [ 'nan_persistent_pre_12_inl.h', 436, 420 ]
236 silly gunzTarPerm extractEntry nan_string_bytes.h
237 silly gunzTarPerm modified mode [ 'nan_string_bytes.h', 436, 420 ]
238 silly gunzTarPerm extractEntry nan_typedarray_contents.h
239 silly gunzTarPerm modified mode [ 'nan_typedarray_contents.h', 436, 420 ]
240 silly gunzTarPerm extractEntry nan_weak.h
241 silly gunzTarPerm modified mode [ 'nan_weak.h', 436, 420 ]
242 silly gunzTarPerm extractEntry tools/package.json
243 silly gunzTarPerm modified mode [ 'tools/package.json', 436, 420 ]
244 silly gunzTarPerm extractEntry tools/README.md
245 silly gunzTarPerm modified mode [ 'tools/README.md', 436, 420 ]
246 silly gunzTarPerm extractEntry tools/1to2.js
247 silly gunzTarPerm modified mode [ 'tools/1to2.js', 509, 493 ]
248 silly gentlyRm /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c/node_modules is being purged
249 verbose gentlyRm don't care about contents; nuking /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c/node_modules
250 silly doParallel preinstall 2
251 silly preinstall [email protected] /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c
252 info lifecycle [email protected]
preinstall: [email protected]
253 silly preinstall [email protected] /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35
254 info lifecycle [email protected]
preinstall: [email protected]
255 silly lifecycle [email protected]
preinstall: no script for preinstall, continuing
256 silly lifecycle [email protected]
preinstall: no script for preinstall, continuing
257 silly doReverseSerial remove 0
258 silly doSerial move 0
259 silly doSerial finalize 2
260 silly finalize /Users/jack/node-playground/test-pdf/node_modules/nan
261 silly finalize /Users/jack/node-playground/test-pdf/node_modules/pdf-fill-form
262 silly doSerial build 2
263 silly build [email protected]
264 info linkStuff [email protected]
265 silly linkStuff [email protected] has /Users/jack/node-playground/test-pdf/node_modules as its parent node_modules
266 verbose linkBins [email protected]
267 verbose linkMans [email protected]
268 silly build [email protected]
269 info linkStuff [email protected]
270 silly linkStuff [email protected] has /Users/jack/node-playground/test-pdf/node_modules as its parent node_modules
271 verbose linkBins [email protected]
272 verbose linkMans [email protected]
273 silly doSerial global-link 0
274 silly doParallel update-linked 0
275 silly doSerial install 2
276 silly install [email protected] /Users/jack/node-playground/test-pdf/node_modules/.staging/nan-4bd6079c
277 info lifecycle [email protected]install: [email protected]
278 silly lifecycle [email protected]
install: no script for install, continuing
279 silly install [email protected] /Users/jack/node-playground/test-pdf/node_modules/.staging/pdf-fill-form-5c0a5a35
280 info lifecycle [email protected]install: [email protected]
281 verbose lifecycle [email protected]
install: unsafe-perm in lifecycle true
282 verbose lifecycle [email protected]install: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/jack/node-playground/test-pdf/node_modules/pdf-fill-form/node_modules/.bin:/Users/jack/node-playground/test-pdf/node_modules/.bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands
283 verbose lifecycle [email protected]
install: CWD: /Users/jack/node-playground/test-pdf/node_modules/pdf-fill-form
284 silly lifecycle [email protected]install: Args: [ '-c', 'node-gyp rebuild' ]
285 silly lifecycle [email protected]
install: Returned: code: 1 signal: null
286 info lifecycle [email protected]~install: Failed to exec install script
287 verbose unlock done using /Users/jack/.npm/_locks/staging-a858603dceb08c51.lock for /Users/jack/node-playground/test-pdf/node_modules/.staging
288 silly rollbackFailedOptional Starting
289 silly rollbackFailedOptional Finishing
290 silly runTopLevelLifecycles Starting
291 silly runTopLevelLifecycles Finishing
292 silly install printInstalled
293 warn [email protected] No description
294 warn [email protected] No repository field.
295 verbose stack Error: [email protected] install: node-gyp rebuild
295 verbose stack Exit status 1
295 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
295 verbose stack at emitTwo (events.js:106:13)
295 verbose stack at EventEmitter.emit (events.js:191:7)
295 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
295 verbose stack at emitTwo (events.js:106:13)
295 verbose stack at ChildProcess.emit (events.js:191:7)
295 verbose stack at maybeClose (internal/child_process.js:850:16)
295 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
296 verbose pkgid [email protected]
297 verbose cwd /Users/jack/node-playground/test-pdf
298 error Darwin 15.5.0
299 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pdf-fill-form" "--save"
300 error node v6.0.0
301 error npm v3.10.5
302 error code ELIFECYCLE
303 error [email protected] install: node-gyp rebuild
303 error Exit status 1
304 error Failed at the [email protected] install script 'node-gyp rebuild'.
304 error Make sure you have the latest version of node.js and npm installed.
304 error If you do, this is most likely a problem with the pdf-fill-form package,
304 error not with npm itself.
304 error Tell the author that this fails on your system:
304 error node-gyp rebuild
304 error You can get information on how to open an issue for this project with:
304 error npm bugs pdf-fill-form
304 error Or if that isn't available, you can get their info via:
304 error npm owner ls pdf-fill-form
304 error There is likely additional logging output above.
305 verbose exit [ 1, true ]

Memory leak after generation file

My application runs continuously. It generates one file per session. But there is a problem that after each application consumes more and more memory. That is, a memory leak occurs after file generation.
p.s. If you do not create the file during the session - no leaks. It occurs only after the generation.

Support for node 0.10.x ?

I know it is not likely that you would support node 1.10.x. Nevertheless, can you give me some hints on how to support node 0.10.x?

I would like to contribute and maintain another branch.

unable to install this package, below is the debug log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly install normalizeTree
8 silly loadCurrentTree Finishing
9 silly loadIdealTree Starting
10 silly install loadIdealTree
11 silly cloneCurrentTree Starting
12 silly install cloneCurrentTreeToIdealTree
13 silly cloneCurrentTree Finishing
14 silly loadShrinkwrap Starting
15 silly install loadShrinkwrap
16 silly loadShrinkwrap Finishing
17 silly loadAllDepsIntoIdealTree Starting
18 silly install loadAllDepsIntoIdealTree
19 silly fetchNamedPackageData node-gyp
20 silly mapToRegistry name node-gyp
21 silly mapToRegistry using default registry
22 silly mapToRegistry registry https://registry.npmjs.org/
23 silly mapToRegistry data Result {
23 silly mapToRegistry raw: 'node-gyp',
23 silly mapToRegistry scope: null,
23 silly mapToRegistry escapedName: 'node-gyp',
23 silly mapToRegistry name: 'node-gyp',
23 silly mapToRegistry rawSpec: '',
23 silly mapToRegistry spec: 'latest',
23 silly mapToRegistry type: 'tag' }
24 silly mapToRegistry uri https://registry.npmjs.org/node-gyp
25 silly fetchNamedPackageData pdf-fill-form
26 silly mapToRegistry name pdf-fill-form
27 silly mapToRegistry using default registry
28 silly mapToRegistry registry https://registry.npmjs.org/
29 silly mapToRegistry data Result {
29 silly mapToRegistry raw: 'pdf-fill-form',
29 silly mapToRegistry scope: null,
29 silly mapToRegistry escapedName: 'pdf-fill-form',
29 silly mapToRegistry name: 'pdf-fill-form',
29 silly mapToRegistry rawSpec: '',
29 silly mapToRegistry spec: 'latest',
29 silly mapToRegistry type: 'tag' }
30 silly mapToRegistry uri https://registry.npmjs.org/pdf-fill-form
31 silly fetchNamedPackageData rebuild
32 silly mapToRegistry name rebuild
33 silly mapToRegistry using default registry
34 silly mapToRegistry registry https://registry.npmjs.org/
35 silly mapToRegistry data Result {
35 silly mapToRegistry raw: 'rebuild',
35 silly mapToRegistry scope: null,
35 silly mapToRegistry escapedName: 'rebuild',
35 silly mapToRegistry name: 'rebuild',
35 silly mapToRegistry rawSpec: '',
35 silly mapToRegistry spec: 'latest',
35 silly mapToRegistry type: 'tag' }
36 silly mapToRegistry uri https://registry.npmjs.org/rebuild
37 verbose request uri https://registry.npmjs.org/node-gyp
38 verbose request no auth needed
39 info attempt registry request try #1 at 5:42:51 PM
40 verbose request id 2f95eb962b3f3d80
41 verbose etag W/"58f3a270-223a3"
42 verbose lastModified Sun, 16 Apr 2017 16:57:20 GMT
43 http request GET https://registry.npmjs.org/node-gyp
44 verbose request uri https://registry.npmjs.org/pdf-fill-form
45 verbose request no auth needed
46 info attempt registry request try #1 at 5:42:51 PM
47 verbose etag W/"58ef5205-7306"
48 verbose lastModified Thu, 13 Apr 2017 10:25:09 GMT
49 http request GET https://registry.npmjs.org/pdf-fill-form
50 verbose request uri https://registry.npmjs.org/rebuild
51 verbose request no auth needed
52 info attempt registry request try #1 at 5:42:51 PM
53 verbose etag W/"5036f0b7-19d7"
54 verbose lastModified Fri, 24 Aug 2012 03:10:47 GMT
55 http request GET https://registry.npmjs.org/rebuild
56 http 304 https://registry.npmjs.org/pdf-fill-form
57 verbose headers { date: 'Mon, 17 Apr 2017 21:42:51 GMT',
57 verbose headers via: '1.1 varnish',
57 verbose headers 'cache-control': 'max-age=300',
57 verbose headers etag: 'W/"58ef5205-7306"',
57 verbose headers age: '218',
57 verbose headers connection: 'keep-alive',
57 verbose headers 'x-served-by': 'cache-mia1321-MIA',
57 verbose headers 'x-cache': 'HIT',
57 verbose headers 'x-cache-hits': '4',
57 verbose headers 'x-timer': 'S1492465371.155748,VS0,VE0',
57 verbose headers vary: 'Accept-Encoding' }
58 silly get cb [ 304,
58 silly get { date: 'Mon, 17 Apr 2017 21:42:51 GMT',
58 silly get via: '1.1 varnish',
58 silly get 'cache-control': 'max-age=300',
58 silly get etag: 'W/"58ef5205-7306"',
58 silly get age: '218',
58 silly get connection: 'keep-alive',
58 silly get 'x-served-by': 'cache-mia1321-MIA',
58 silly get 'x-cache': 'HIT',
58 silly get 'x-cache-hits': '4',
58 silly get 'x-timer': 'S1492465371.155748,VS0,VE0',
58 silly get vary: 'Accept-Encoding' } ]
59 verbose etag https://registry.npmjs.org/pdf-fill-form from cache
60 verbose get saving pdf-fill-form to /Users/jay/.npm/registry.npmjs.org/pdf-fill-form/.cache.json
61 verbose correctMkdir /Users/jay/.npm correctMkdir not in flight; initializing
62 http 304 https://registry.npmjs.org/node-gyp
63 verbose headers { date: 'Mon, 17 Apr 2017 21:42:51 GMT',
63 verbose headers via: '1.1 varnish',
63 verbose headers 'cache-control': 'max-age=300',
63 verbose headers etag: 'W/"58f3a270-223a3"',
63 verbose headers age: '95',
63 verbose headers connection: 'keep-alive',
63 verbose headers 'x-served-by': 'cache-mia1324-MIA',
63 verbose headers 'x-cache': 'HIT',
63 verbose headers 'x-cache-hits': '2',
63 verbose headers 'x-timer': 'S1492465371.160631,VS0,VE0',
63 verbose headers vary: 'Accept-Encoding' }
64 silly get cb [ 304,
64 silly get { date: 'Mon, 17 Apr 2017 21:42:51 GMT',
64 silly get via: '1.1 varnish',
64 silly get 'cache-control': 'max-age=300',
64 silly get etag: 'W/"58f3a270-223a3"',
64 silly get age: '95',
64 silly get connection: 'keep-alive',
64 silly get 'x-served-by': 'cache-mia1324-MIA',
64 silly get 'x-cache': 'HIT',
64 silly get 'x-cache-hits': '2',
64 silly get 'x-timer': 'S1492465371.160631,VS0,VE0',
64 silly get vary: 'Accept-Encoding' } ]
65 verbose etag https://registry.npmjs.org/node-gyp from cache
66 verbose get saving node-gyp to /Users/jay/.npm/registry.npmjs.org/node-gyp/.cache.json
67 verbose correctMkdir /Users/jay/.npm correctMkdir already in flight; waiting
68 http 304 https://registry.npmjs.org/rebuild
69 verbose headers { date: 'Mon, 17 Apr 2017 21:42:51 GMT',
69 verbose headers via: '1.1 varnish',
69 verbose headers 'cache-control': 'max-age=300',
69 verbose headers etag: 'W/"5036f0b7-19d7"',
69 verbose headers age: '95',
69 verbose headers connection: 'keep-alive',
69 verbose headers 'x-served-by': 'cache-mia1327-MIA',
69 verbose headers 'x-cache': 'HIT',
69 verbose headers 'x-cache-hits': '1',
69 verbose headers 'x-timer': 'S1492465371.160892,VS0,VE0',
69 verbose headers vary: 'Accept-Encoding' }
70 silly get cb [ 304,
70 silly get { date: 'Mon, 17 Apr 2017 21:42:51 GMT',
70 silly get via: '1.1 varnish',
70 silly get 'cache-control': 'max-age=300',
70 silly get etag: 'W/"5036f0b7-19d7"',
70 silly get age: '95',
70 silly get connection: 'keep-alive',
70 silly get 'x-served-by': 'cache-mia1327-MIA',
70 silly get 'x-cache': 'HIT',
70 silly get 'x-cache-hits': '1',
70 silly get 'x-timer': 'S1492465371.160892,VS0,VE0',
70 silly get vary: 'Accept-Encoding' } ]
71 verbose etag https://registry.npmjs.org/rebuild from cache
72 verbose get saving rebuild to /Users/jay/.npm/registry.npmjs.org/rebuild/.cache.json
73 verbose correctMkdir /Users/jay/.npm correctMkdir already in flight; waiting
74 silly resolveWithNewModule [email protected] checking installable status
75 silly cache add args [ 'pdf-fill-form@', null ]
76 verbose cache add spec pdf-fill-form@

77 silly cache add parsed spec Result {
77 silly cache add raw: 'pdf-fill-form@',
77 silly cache add scope: null,
77 silly cache add escapedName: 'pdf-fill-form',
77 silly cache add name: 'pdf-fill-form',
77 silly cache add rawSpec: '
',
77 silly cache add spec: '',
77 silly cache add type: 'range' }
78 silly addNamed pdf-fill-form@

79 verbose addNamed "" is a valid semver range for pdf-fill-form
80 silly addNameRange { name: 'pdf-fill-form', range: '
', hasData: false }
81 silly mapToRegistry name pdf-fill-form
82 silly mapToRegistry using default registry
83 silly mapToRegistry registry https://registry.npmjs.org/
84 silly mapToRegistry data Result {
84 silly mapToRegistry raw: 'pdf-fill-form',
84 silly mapToRegistry scope: null,
84 silly mapToRegistry escapedName: 'pdf-fill-form',
84 silly mapToRegistry name: 'pdf-fill-form',
84 silly mapToRegistry rawSpec: '',
84 silly mapToRegistry spec: 'latest',
84 silly mapToRegistry type: 'tag' }
85 silly mapToRegistry uri https://registry.npmjs.org/pdf-fill-form
86 verbose addNameRange registry:https://registry.npmjs.org/pdf-fill-form not in flight; fetching
87 silly resolveWithNewModule [email protected] checking installable status
88 silly cache add args [ 'node-gyp@^3.6.0', null ]
89 verbose cache add spec node-gyp@^3.6.0
90 silly cache add parsed spec Result {
90 silly cache add raw: 'node-gyp@^3.6.0',
90 silly cache add scope: null,
90 silly cache add escapedName: 'node-gyp',
90 silly cache add name: 'node-gyp',
90 silly cache add rawSpec: '^3.6.0',
90 silly cache add spec: '>=3.6.0 <4.0.0',
90 silly cache add type: 'range' }
91 silly addNamed node-gyp@>=3.6.0 <4.0.0
92 verbose addNamed ">=3.6.0 <4.0.0" is a valid semver range for node-gyp
93 silly addNameRange { name: 'node-gyp', range: '>=3.6.0 <4.0.0', hasData: false }
94 silly mapToRegistry name node-gyp
95 silly mapToRegistry using default registry
96 silly mapToRegistry registry https://registry.npmjs.org/
97 silly mapToRegistry data Result {
97 silly mapToRegistry raw: 'node-gyp',
97 silly mapToRegistry scope: null,
97 silly mapToRegistry escapedName: 'node-gyp',
97 silly mapToRegistry name: 'node-gyp',
97 silly mapToRegistry rawSpec: '',
97 silly mapToRegistry spec: 'latest',
97 silly mapToRegistry type: 'tag' }
98 silly mapToRegistry uri https://registry.npmjs.org/node-gyp
99 verbose addNameRange registry:https://registry.npmjs.org/node-gyp not in flight; fetching
100 silly resolveWithNewModule [email protected] checking installable status
101 silly cache add args [ 'rebuild@^0.1.2', null ]
102 verbose cache add spec rebuild@^0.1.2
103 silly cache add parsed spec Result {
103 silly cache add raw: 'rebuild@^0.1.2',
103 silly cache add scope: null,
103 silly cache add escapedName: 'rebuild',
103 silly cache add name: 'rebuild',
103 silly cache add rawSpec: '^0.1.2',
103 silly cache add spec: '>=0.1.2 <0.2.0',
103 silly cache add type: 'range' }
104 silly addNamed rebuild@>=0.1.2 <0.2.0
105 verbose addNamed ">=0.1.2 <0.2.0" is a valid semver range for rebuild
106 silly addNameRange { name: 'rebuild', range: '>=0.1.2 <0.2.0', hasData: false }
107 silly mapToRegistry name rebuild
108 silly mapToRegistry using default registry
109 silly mapToRegistry registry https://registry.npmjs.org/
110 silly mapToRegistry data Result {
110 silly mapToRegistry raw: 'rebuild',
110 silly mapToRegistry scope: null,
110 silly mapToRegistry escapedName: 'rebuild',
110 silly mapToRegistry name: 'rebuild',
110 silly mapToRegistry rawSpec: '',
110 silly mapToRegistry spec: 'latest',
110 silly mapToRegistry type: 'tag' }
111 silly mapToRegistry uri https://registry.npmjs.org/rebuild
112 verbose addNameRange registry:https://registry.npmjs.org/rebuild not in flight; fetching
113 verbose get https://registry.npmjs.org/pdf-fill-form not expired, no request
114 silly addNameRange number 2 { name: 'pdf-fill-form', range: '*', hasData: true }
115 silly addNameRange versions [ 'pdf-fill-form',
115 silly addNameRange [ '0.0.1',
115 silly addNameRange '0.0.2',
115 silly addNameRange '0.0.3',
115 silly addNameRange '0.0.4',
115 silly addNameRange '0.0.5',
115 silly addNameRange '0.0.6',
115 silly addNameRange '0.1.0',
115 silly addNameRange '0.1.1',
115 silly addNameRange '0.1.2',
115 silly addNameRange '0.1.3',
115 silly addNameRange '1.0.0',
115 silly addNameRange '1.0.1',
115 silly addNameRange '1.0.2',
115 silly addNameRange '1.0.3',
115 silly addNameRange '1.0.4',
115 silly addNameRange '1.1.0',
115 silly addNameRange '2.0.0',
115 silly addNameRange '3.0.0',
115 silly addNameRange '3.0.1',
115 silly addNameRange '3.1.0',
115 silly addNameRange '3.1.1' ] ]
116 silly addNamed [email protected]
117 verbose addNamed "3.1.1" is a plain semver version for pdf-fill-form
118 verbose get https://registry.npmjs.org/rebuild not expired, no request
119 silly addNameRange number 2 { name: 'rebuild', range: '>=0.1.2 <0.2.0', hasData: true }
120 silly addNameRange versions [ 'rebuild', [ '0.1.0', '0.1.1', '0.1.2' ] ]
121 silly addNamed [email protected]
122 verbose addNamed "0.1.2" is a plain semver version for rebuild
123 verbose get https://registry.npmjs.org/node-gyp not expired, no request
124 silly addNameRange number 2 { name: 'node-gyp', range: '>=3.6.0 <4.0.0', hasData: true }
125 silly addNameRange versions [ 'node-gyp',
125 silly addNameRange [ '0.0.1',
125 silly addNameRange '0.0.2',
125 silly addNameRange '0.0.3',
125 silly addNameRange '0.0.4',
125 silly addNameRange '0.0.5',
125 silly addNameRange '0.0.6',
125 silly addNameRange '0.1.0',
125 silly addNameRange '0.1.1',
125 silly addNameRange '0.1.2',
125 silly addNameRange '0.1.3',
125 silly addNameRange '0.1.4',
125 silly addNameRange '0.2.0',
125 silly addNameRange '0.2.1',
125 silly addNameRange '0.2.2',
125 silly addNameRange '0.3.0',
125 silly addNameRange '0.3.1',
125 silly addNameRange '0.3.2',
125 silly addNameRange '0.3.4',
125 silly addNameRange '0.3.5',
125 silly addNameRange '0.3.6',
125 silly addNameRange '0.3.7',
125 silly addNameRange '0.3.8',
125 silly addNameRange '0.3.9',
125 silly addNameRange '0.3.10',
125 silly addNameRange '0.3.11',
125 silly addNameRange '0.4.0',
125 silly addNameRange '0.4.1',
125 silly addNameRange '0.4.2',
125 silly addNameRange '0.4.3',
125 silly addNameRange '0.4.4',
125 silly addNameRange '0.4.5',
125 silly addNameRange '0.5.0',
125 silly addNameRange '0.5.1',
125 silly addNameRange '0.5.2',
125 silly addNameRange '0.5.3',
125 silly addNameRange '0.5.4',
125 silly addNameRange '0.5.5',
125 silly addNameRange '0.5.6',
125 silly addNameRange '0.5.7',
125 silly addNameRange '0.5.8',
125 silly addNameRange '0.6.0',
125 silly addNameRange '0.6.1',
125 silly addNameRange '0.6.2',
125 silly addNameRange '0.6.3',
125 silly addNameRange '0.6.4',
125 silly addNameRange '0.6.5',
125 silly addNameRange '0.6.6',
125 silly addNameRange '0.6.7',
125 silly addNameRange '0.6.8',
125 silly addNameRange '0.6.9',
125 silly addNameRange '0.6.10',
125 silly addNameRange '0.6.11',
125 silly addNameRange '0.7.0',
125 silly addNameRange '0.7.1',
125 silly addNameRange '0.7.2',
125 silly addNameRange '0.7.3',
125 silly addNameRange '0.8.0',
125 silly addNameRange '0.8.1',
125 silly addNameRange '0.8.2',
125 silly addNameRange '0.8.3',
125 silly addNameRange '0.8.4',
125 silly addNameRange '0.8.5',
125 silly addNameRange '0.9.0',
125 silly addNameRange '0.9.1',
125 silly addNameRange '0.9.2',
125 silly addNameRange '0.9.3',
125 silly addNameRange '0.9.4',
125 silly addNameRange '0.9.5',
125 silly addNameRange '0.9.6',
125 silly addNameRange '0.10.0',
125 silly addNameRange '0.10.1',
125 silly addNameRange '0.10.2',
125 silly addNameRange '0.10.3',
125 silly addNameRange '0.10.4',
125 silly addNameRange '0.10.5',
125 silly addNameRange '0.10.6',
125 silly addNameRange '0.10.7',
125 silly addNameRange '0.10.8',
125 silly addNameRange '0.10.9',
125 silly addNameRange '0.10.10',
125 silly addNameRange '0.11.0',
125 silly addNameRange '0.12.0',
125 silly addNameRange '0.12.1',
125 silly addNameRange '0.12.2',
125 silly addNameRange '0.13.0',
125 silly addNameRange '0.13.1',
125 silly addNameRange '1.0.0',
125 silly addNameRange '1.0.1',
125 silly addNameRange '1.0.2',
125 silly addNameRange '1.0.3',
125 silly addNameRange '2.0.0',
125 silly addNameRange '2.0.1',
125 silly addNameRange '2.0.2',
125 silly addNameRange '3.0.0',
125 silly addNameRange '3.0.1',
125 silly addNameRange '3.0.2',
125 silly addNameRange '3.0.3',
125 silly addNameRange '3.1.0',
125 silly addNameRange '3.2.0',
125 silly addNameRange '3.2.1',
125 silly addNameRange ... 5 more items ] ]
126 silly addNamed [email protected]
127 verbose addNamed "3.6.0" is a plain semver version for node-gyp
128 silly cache afterAdd [email protected]
129 verbose afterAdd /Users/jay/.npm/pdf-fill-form/3.1.1/package/package.json not in flight; writing
130 verbose correctMkdir /Users/jay/.npm correctMkdir not in flight; initializing
131 silly cache afterAdd [email protected]

Error During Installation on Ubuntu 15.04

I'm getting child_process: customFds option is deprecated, use stdio instead. when I run npm install (I also tried -g and it gave me the same error)

Here's the full output:

> [email protected] install /home/alexb/form-filler/node_modules/pdf-fill-form
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/home/alexb/form-filler/node_modules/pdf-fill-form/build'
  CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
../src/pdf-fill-form.cc: In function ‘void InitAll(v8::Handle<v8::Object>)’:
../src/pdf-fill-form.cc:13:16: error: ‘NanNew’ was not declared in this scope
   exports->Set(NanNew<String>("readSync"),
        ^
../src/pdf-fill-form.cc:13:29: error: expected primary-expression before ‘>’ token
   exports->Set(NanNew<String>("readSync"),
                 ^
../src/pdf-fill-form.cc:14:28: error: expected primary-expression before ‘>’ token
     NanNew<FunctionTemplate>(ReadSync)->GetFunction());
                ^
../src/pdf-fill-form.cc:14:41: error: request for member ‘GetFunction’ in ‘ReadSync’, which is of non-class type ‘Nan::NAN_METHOD_RETURN_TYPE(Nan::NAN_METHOD_ARGS_TYPE) {aka void(const Nan::FunctionCallbackInfo<v8::Value>&)}’
     NanNew<FunctionTemplate>(ReadSync)->GetFunction());
                     ^
../src/pdf-fill-form.cc:16:29: error: expected primary-expression before ‘>’ token
   exports->Set(NanNew<String>("writeSync"),
                 ^
../src/pdf-fill-form.cc:17:28: error: expected primary-expression before ‘>’ token
     NanNew<FunctionTemplate>(WriteSync)->GetFunction());
                ^
../src/pdf-fill-form.cc:17:42: error: request for member ‘GetFunction’ in ‘WriteSync’, which is of non-class type ‘Nan::NAN_METHOD_RETURN_TYPE(Nan::NAN_METHOD_ARGS_TYPE) {aka void(const Nan::FunctionCallbackInfo<v8::Value>&)}’
     NanNew<FunctionTemplate>(WriteSync)->GetFunction());
                      ^
../src/pdf-fill-form.cc:19:29: error: expected primary-expression before ‘>’ token
   exports->Set(NanNew<String>("writeAsync"),
                 ^
../src/pdf-fill-form.cc:20:28: error: expected primary-expression before ‘>’ token
     NanNew<FunctionTemplate>(WriteAsync)->GetFunction());
                ^
../src/pdf-fill-form.cc:20:43: error: request for member ‘GetFunction’ in ‘WriteAsync’, which is of non-class type ‘Nan::NAN_METHOD_RETURN_TYPE(Nan::NAN_METHOD_ARGS_TYPE) {aka void(const Nan::FunctionCallbackInfo<v8::Value>&)}’
     NanNew<FunctionTemplate>(WriteAsync)->GetFunction());
                       ^
pdf_fill_form.target.mk:108: recipe for target 'Release/obj.target/pdf_fill_form/src/pdf-fill-form.o' failed
make: *** [Release/obj.target/pdf_fill_form/src/pdf-fill-form.o] Error 1
make: Leaving directory '/home/alexb/form-filler/node_modules/pdf-fill-form/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.19.0-22-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/alexb/form-filler/node_modules/pdf-fill-form
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Linux 3.19.0-22-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pdf-fill-form" "--save"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/alexb/form-filler/npm-debug.log

ctime error no member named 'clock' in the global namespace

node -v && npm -v
v8.12.0
6.4.1
xcode-select -v
xcode-select version 2354

OSX 10.14.1 Mojave

> git clone [email protected]:tpisto/pdf-fill-form.git
> cd pdf-fill-form
> npm i


> [email protected] install /Users/.../work/pdf-fill-form
> node-gyp rebuild

  CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../src/pdf-fill-form.cc:2:
In file included from ../src/NodePoppler.h:5:
In file included from /usr/local/include/QtCore/QBuffer:1:
In file included from /usr/local/include/QtCore/qbuffer.h:43:
In file included from /usr/local/include/QtCore/qiodevice.h:43:
In file included from /usr/local/include/QtCore/qglobal.h:1201:
In file included from /usr/local/include/QtCore/qglobalstatic.h:100:
In file included from /usr/local/include/QtCore/qmutex.h:48:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:60:9: error: no member named 'clock' in the global namespace; did you mean 'flock'?
using ::clock;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/fcntl.h:528:5: note: 'flock' declared here
int     flock(int, int);
        ^
In file included from ../src/pdf-fill-form.cc:2:
In file included from ../src/NodePoppler.h:5:
In file included from /usr/local/include/QtCore/QBuffer:1:
In file included from /usr/local/include/QtCore/qbuffer.h:43:
In file included from /usr/local/include/QtCore/qiodevice.h:43:
In file included from /usr/local/include/QtCore/qglobal.h:1201:
In file included from /usr/local/include/QtCore/qglobalstatic.h:100:
In file included from /usr/local/include/QtCore/qmutex.h:48:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:61:9: error: no member named 'difftime' in the global namespace
using ::difftime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:62:9: error: no member named 'mktime' in the global namespace; did you mean 'mktemp'?
using ::mktime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:216:7: note: 'mktemp' declared here
char    *mktemp(char *);
         ^
In file included from ../src/pdf-fill-form.cc:2:
In file included from ../src/NodePoppler.h:5:
In file included from /usr/local/include/QtCore/QBuffer:1:
In file included from /usr/local/include/QtCore/qbuffer.h:43:
In file included from /usr/local/include/QtCore/qiodevice.h:43:
In file included from /usr/local/include/QtCore/qglobal.h:1201:
In file included from /usr/local/include/QtCore/qglobalstatic.h:100:
In file included from /usr/local/include/QtCore/qmutex.h:48:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono:303:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:63:9: error: no member named 'time' in the global namespace
using ::time;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:65:9: error: no member named 'asctime' in the global namespace
using ::asctime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:66:9: error: no member named 'ctime' in the global namespace
using ::ctime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:67:9: error: no member named 'gmtime' in the global namespace
using ::gmtime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:68:9: error: no member named 'localtime' in the global namespace
using ::localtime;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:70:9: error: no member named 'strftime' in the global namespace
using ::strftime;
      ~~^
9 errors generated.
make: *** [Release/obj.target/pdf_fill_form/src/pdf-fill-form.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node@8/8.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node@8/8.12.0/bin/node" "/usr/local/Cellar/node@8/8.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/.../work/pdf-fill-form
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/.../.npm/_logs/2018-11-09T15_36_19_351Z-debug.log

Checking checkboxes

Hi! How would I check checkboxes? I tried setting the fieldname to true / false, but it didn't work

AWS installing necessary libraries

I have a hard time installing this module on AWS Elastic Beanstalk, basically npm install fails when trying to install this package… my guess is, it has to do with the libraries that are needed to install prior before installing the module itself via npm.

I can specify packages that get installed prior npm install, but apt-get is not available

But I can specify yum packages in my .ebextensions config gile like so

packages: 
  yum:
    libmemcached: [] 
    ruby-devel: []
    gcc: []

But I have no idea, what yum packages would be needed.

using these don't work. Can you help out?

packages:
  yum:
    libpoppler-qt5-dev: []
    libcairo2-dev: []

write's result (Node.js Buffer) is not consistent

The result (Buffer) have different values and slightly different size every time pdf-fill-form's write is called.

var pdfFillForm = require('pdf-fill-form');
var crypto = require('crypto');
var fs = require('fs');
var Promise = require('bluebird');

var pdf = {
    Married: true    
};

var jsonSha1Signature = crypto.createHash('sha1').update(JSON.stringify(pdf)).digest('hex');
console.log(jsonSha1Signature);

pdfFillForm.write('./fw4x.pdf', pdf, {'save': 'pdf'}).then(function(result) 
{
    var  fsWriteFile = Promise.promisify(fs.writeFile);

    return fsWriteFile('blah.pdf', result).then(function(writeResult) 
    {
        var algo = 'sha1';
        var shasum = crypto.createHash(algo);

        var file = 'blah.pdf';
        var s = fs.ReadStream(file);
        s.on('data', function(d) { shasum.update(d); });
        s.on('end', function() {
            var d = shasum.digest('hex');
            console.log(d);
        });

    });

});


image

The second console.log gives different checksums every time a PDF is generated. Copied blah.pdf to meh.pdf on first run, and compared the next generated pdf with previous one using diff, the generated files are different, even the filesizes are slightly different, blah.pdf 61,197, yet meh.pdf is 61,195.

Pass in buffer object?

Hey I'm playing around with the library, and was wondering if it's possible to pass in a buffer object to the read method or if it needs to a pdf file.

Readonly PDF

Could you please share your thoughts on making the generated PDF readonly. In my use case - I cannot let users edit the auto-generated pdf - Thank you!

Failure to build post upgrade to QT5

Now since the upgrade to 5, the application won't build. I just get failure on NPM install:

make: Entering directory '/app/node_modules/pdf-fill-form/build'
CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../src/pdf-fill-form.cc:2:0:
../src/NodePoppler.h:5:26: fatal error: QtCore/QBuffer: No such file or directory
compilation terminated. The image I'm using already has updated to qt5, but attempting to do the install for pdf-fill-form dies per the above

NodePoppler.h:5:10: fatal error

I have an issue trying install npm module

My Steps

  1. $ brew update
  2. $ brew install qt5 cairo poppler --with-qt5
  3. $ brew linkapps qt5
  4. $ brew link --force qt5

Up to this point no errors install, but when I try install npm module

$ npm install pdf-fill-form
  CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../src/pdf-fill-form.cc:2:
../src/NodePoppler.h:5:10: fatal error: 'QtCore/QBuffer' file not found
#include <QtCore/QBuffer>
         ^
1 error generated.

Extra info:

MacOs: Sierra 10.12
NODE version: v6.3.0

Accept buffer instead of filename

In several use cases, you already have the file loaded in memory. It doesn't make sense to save that to a tmp file and then load that into pdf-fill-form. It would be a lot more convenient if we could do something like:

pdfFillForm.read(buffer)
// or
pdfFillForm.write(buffer, { field1: val, field2: val }, { save: 'pdf' })

Error: npm install pdf-fill-form - ../src/NodePoppler.cc:18:10: fatal error: 'QMutex' file not found #include <QMutex>

Issue:
I am building a simple test application pdf-fill-form but cannot get the npm install pdf-fill-form to work

versions:
Node.js v8.10.0 to /usr/local/bin/node
[email protected] to /usr/local/bin/npm

Steps to reproduce:

  1. ng new test-pdf-fill-form

cd test-pdf-fill-form

  1. brew:

brew update
brew install qt5 cairo poppler --with-qt5
Warning: qt 5.10.1 is already installed
Warning: cairo 1.14.12 is already installed
Warning: poppler 0.63.0_1 is already installed

  1. I have xcode command line tools installed:

xcode-select version 2349.

  1. I have done the exports:

export LDFLAGS=-L/usr/local/opt/qt5/lib
export CPPFLAGS=-I/usr/local/opt/qt5/include
export PKG_CONFIG_PATH=/usr/local/opt/qt5/lib/pkgconfig

  1. npm install pdf-fill-form
    npm install -save pdf-fill-form

[email protected] install /Users/nabgilby/Google Drive/Code/Web/test-pdf-fill-form/node_modules/pdf-fill-form
node-gyp rebuild

CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePopplerAsync.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePoppler.o
../src/NodePoppler.cc:18:10: fatal error: 'QMutex' file not found
#include
^~~~~~~~
1 error generated.
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/nabgilby/Google Drive/Code/Web/test-pdf-fill-form/node_modules/pdf-fill-form
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nabgilby/.npm/_logs/2018-03-21T22_04_26_477Z-debug.log

  1. cat /Users/nabgilby/.npm/_logs/2018-03-21T22_04_26_477Z-debug.log
    (ommitted the silly savetree, happy to provide)...
    87 verbose stack Error: [email protected] install: node-gyp rebuild
    87 verbose stack Exit status 1
    87 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
    87 verbose stack at emitTwo (events.js:126:13)
    87 verbose stack at EventEmitter.emit (events.js:214:7)
    87 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    87 verbose stack at emitTwo (events.js:126:13)
    87 verbose stack at ChildProcess.emit (events.js:214:7)
    87 verbose stack at maybeClose (internal/child_process.js:925:16)
    87 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    88 verbose pkgid [email protected]
    89 verbose cwd /Users/nabgilby/Google Drive/Code/Web/test-pdf-fill-form
    90 verbose Darwin 17.4.0
    91 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-save" "pdf-fill-form"
    92 verbose node v8.10.0
    93 verbose npm v5.7.1
    94 error code ELIFECYCLE
    95 error errno 1
    96 error [email protected] install: node-gyp rebuild
    96 error Exit status 1
    97 error Failed at the [email protected] install script.
    97 error This is probably not a problem with npm. There is likely additional logging output above.
    98 verbose exit [ 1, true ]

Thank you for your consideration.

Fields render as black boxes

I'm generating a pdf form inside a node:7 docker container and the result, when viewed on Windows and even in my Mac's Quick look window and file thumbnail (see image), is that all fields that have been filled are rendered as black boxes.

This doesn't occur when I run the app on my own mac, only in the docker container. Any idea what could be causing this behaviour?

form

Error in installation with node v5.8

This looks like a problem with the nan module. I've seen several other modules face a similar error.

> [email protected] install /private/var/www/konnect/node/node_modules/pdf-fill-form
> node-gyp rebuild

  CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../src/pdf-fill-form.cc:1:
In file included from ../node_modules/nan/nan.h:80:
In file included from ../node_modules/nan/nan_new.h:190:
../node_modules/nan/nan_implementation_12_inl.h:181:66: error: too many arguments to function call, expected at most 2, have 4
  return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
         ~~~~~~~~~~~~~~~~~~                                      ^~~~~~~~~~
/Users/pravin/.node-gyp/5.8.0/include/node/v8.h:4674:3: note: 'New' declared here
  static Local<Signature> New(
  ^
In file included from ../src/pdf-fill-form.cc:1:
../node_modules/nan/nan.h:171:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:166:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                        ^
../node_modules/nan/nan.h:317:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Primitive]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:322:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Primitive]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:327:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Boolean]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:332:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Boolean]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:564:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../node_modules/nan/nan.h:575:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/pravin/.node-gyp/5.8.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for
      3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/pravin/.node-gyp/5.8.0/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/pravin/.node-gyp/5.8.0/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/pravin/.node-gyp/5.8.0/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../src/pdf-fill-form.cc:1:
../node_modules/nan/nan.h:579:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pravin/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>'
      to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
/Users/pravin/.node-gyp/5.8.0/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>'
      to 'v8::Local<v8::Object> &&' for 1st argument
class Local {
      ^
/Users/pravin/.node-gyp/5.8.0/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/pravin/.node-gyp/5.8.0/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
  V8_INLINE Local(S* that)
            ^
In file included from ../src/pdf-fill-form.cc:1:
../node_modules/nan/nan.h:586:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:1403:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Function]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:1452:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(node::MakeCallback(
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Value]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
../node_modules/nan/nan.h:1522:12: error: no matching function for call to '_NanEnsureLocal'
    return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
                                          ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Object]
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                        ^
13 errors generated.
make: *** [Release/obj.target/pdf_fill_form/src/pdf-fill-form.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/www/konnect/node/node_modules/pdf-fill-form
gyp ERR! node -v v5.8.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok

NodePoppler error

I have a docker container based on debian:jessie image with the necessary libraries installed as in your instructions. npm install fails with the following errors:

[email protected] install /var/www/app/current/node_modules/pdf-fill-form
node-gyp rebuild

make: Entering directory '/var/www/app/current/node_modules/pdf-fill-form/build'
  CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
  CXX(target) Release/obj.target/pdf_fill_form/src/NodePopplerAsync.o
  CXX(target) Release/obj.target/pdf_fill_form/src/NodePoppler.o
../src/NodePoppler.cc: In function 'QBuffer* writePdfFields(WriteFieldsParams)':
../src/NodePoppler.cc:265:16: error: 'formFields' was not declared in this scope
     qDeleteAll(formFields);
                ^
../src/NodePoppler.cc:266:12: error: 'page' was not declared in this scope
     delete page;
            ^
../src/NodePoppler.cc: At global scope:
../src/NodePoppler.cc:271:3: error: 'bufferDevice' does not name a type
   bufferDevice->open(QIODevice::ReadWrite);
   ^
../src/NodePoppler.cc:274:3: error: expected unqualified-id before 'if'
   if (params.saveFormat == "imgpdf") {
   ^
../src/NodePoppler.cc:277:3: error: expected unqualified-id before 'else'
   else {
   ^
../src/NodePoppler.cc:281:3: error: expected unqualified-id before 'delete'
   delete document;
   ^
../src/NodePoppler.cc:283:3: error: expected unqualified-id before 'return'
   return bufferDevice;
   ^
../src/NodePoppler.cc:284:1: error: expected declaration before '}' token
 }
 ^
../src/NodePoppler.cc: In function 'QBuffer* writePdfFields(WriteFieldsParams)':
../src/NodePoppler.cc:267:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
pdf_fill_form.target.mk:118: recipe for target 'Release/obj.target/pdf_fill_form/src/NodePoppler.o' failed
make: Leaving directory '/var/www/app/current/node_modules/pdf-fill-form/build'
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/nvm/versions/node/v6.10.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.9.27-moby
gyp ERR! command "/usr/local/nvm/versions/node/v6.10.2/bin/node" "/usr/local/nvm/versions/node/v6.10.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/app/current/node_modules/pdf-fill-form
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
[email protected] /var/ww

issue installing module in node 0.12.7

Hi, I was trying to install the module through npm on Linux precise 64, and I got the following errors:

../src/NodePoppler.cc: In function 'QBuffer* writePdfFields(WriteFieldsParams)':
../src/NodePoppler.cc:191:26: error: 'class Poppler::FormFieldChoice' has no member named 'setEditChoice'
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
make: Leaving directory `/var/tmp/sharpone/node_modules/pdf-fill-form/build'

Error installing on mac 10.11.1

I am getting an error while npm install pdf-fill-form on my mac.
I installed using homebrew so not sure what I am missing here.

[email protected] install /Users/Developer/MEAN/17-user-crm/node_modules/pdf-fill-form

node-gyp rebuild

CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../src/pdf-fill-form.cc:1:
In file included from ../node_modules/nan/nan.h:80:
In file included from ../node_modules/nan/nan_new.h:190:
../node_modules/nan/nan_implementation_12_inl.h:181:66: error: too many arguments to function call, expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/Users/Atma/.node-gyp/4.0.0/include/node/v8.h:4675:3: note: 'New' declared here
static Local New(
^
In file included from ../src/pdf-fill-form.cc:1:
../node_modules/nan/nan.h:171:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:166:25: note: previous definition is here
NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
^
../node_modules/nan/nan.h:317:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                                      ^~~~~~~~~~~~~~~

../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Primitive]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:322:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                                      ^~~~~~~~~~~~~~~

../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Primitive]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:327:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                                      ^~~~~~~~~~~~~~~

../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Boolean]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:332:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:303:43: note: expanded from macro 'NanEscapeScope'

define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

                                      ^~~~~~~~~~~~~~~

../node_modules/nan/nan.h:171:25: note: candidate template ignored: substitution failure [with T = v8::Boolean]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:564:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:575:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/.node-gyp/4.0.0/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t'
(aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users//.node-gyp/4.0.0/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char ') would
lose const qualifier
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate
isolate,
^
/Users/.node-gyp/4.0.0/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were
provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users//.node-gyp/4.0.0/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were
provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^

Not filling out forms

I get the fields and it looks like this:

{ name: 'form1[0].#subform[0].Line2b_GivenName[0]',
       page: 0,
       value: '',
       id: 65540,
       type: 'text' }

But if I use

let result = await pdf.write( source, {
  'form1[0].#subform[0].Line2b_GivenName[0]': 'senica'
}, {save: 'pdf'});

It does not fill in the form. I've tried several different fields. No errors are thrown and the returned pdf (after I save the result) is able to be opened just fine. It's just not filled in.

I've attached a test file I'm using.

Any thoughts?

g-28.pdf

install fails

using osx High Sierra v10.13.4

OSX 10.13.3
installed qt5, cairo, poppler
installed xCode

Thanks in advance for your help :)

dcs-MacBook-Pro:server dc$ yarn add pdf-fill-form

yarn add v1.4.0

[1/4] 🔍 Resolving packages...

[2/4] 🚚 Fetching packages...

[3/4] 🔗 Linking dependencies...

[4/4] 📃 Building fresh packages...

[1/2] ⠂ iconv: CXX(target) Release/obj.target/iconv/src/binding.o

[2/2] ⠂ pdf-fill-form: ^~~~~~~~~~~~~~~~

[-/2] ⠂ waiting...

[-/2] ⠂ waiting...

error An unexpected error occurred: "/data/dev/react-auth/server/node_modules/pdf-fill-form: Command failed.
Exit code: 1
Command: sh
Arguments: -c node-gyp rebuild
Directory: /data/dev/react-auth/server/node_modules/pdf-fill-form
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/9.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/data/dev/react-auth/server/node_modules/pdf-fill-form/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/9.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/dc/.node-gyp/9.5.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/dc/.node-gyp/9.5.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/9.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/dc/.node-gyp/9.5.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/data/dev/react-auth/server/node_modules/pdf-fill-form',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../src/pdf-fill-form.cc:1:
In file included from ../../nan/nan.h:190:
../../nan/nan_maybe_43_inl.h:88:15: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
^
/Users/dc/.node-gyp/9.5.0/include/node/v8.h:3114:3: note: 'ForceSet' has been explicitly marked deprecated here
V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
^
/Users/dc/.node-gyp/9.5.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
In file included from ../src/pdf-fill-form.cc:2:
../src/NodePoppler.h:5:10: fatal error: 'QtCore/QBuffer' file not found
#include <QtCore/QBuffer>
^~~~~~~~~~~~~~~~
1 warning and 1 error generated.
make: *** [Release/obj.target/pdf_fill_form/src/pdf-fill-form.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/9.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:160:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/Cellar/node/9.5.0/bin/node" "/usr/local/Cellar/node/9.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/dev/react-auth/server/node_modules/pdf-fill-form
gyp ERR! node -v v9.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok".

Error building in node 0.12.0

I can find poppler-form.h in /usr/local/Cellar/poppler/0.42.0/include/poppler/qt4/poppler-form.h
but get the following errors when doing the 'npm install pdf-fill-form'.
Any suggestions?

[email protected] install /Users/chris/pdf-fill-form-test/node_modules/pdf-fill-form
node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePopplerAsync.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePoppler.o
../src/NodePoppler.cc:9:10: fatal error: 'poppler/qt4/poppler-form.h' file not
found

include <poppler/qt4/poppler-form.h>

     ^

1 error generated.
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/chris/pdf-fill-form-test/node_modules/pdf-fill-form
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "pdf-fill-form"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/chris/pdf-fill-form-test/npm-debug.log

How do i pass an array of fields?

Maybe this is silly, but i can´t pass an array of filled fields when writing the pdf with the .write functions.

I've tried doing this:

pdfFillForm.writeSync('someFile.pdf', [ { 'nameField': 'value' }, { 'nameField2': 'value2' } ], { 'save': 'pdf' });

Any tips?

Awesome library, btw!

Build fails at node-gyp rebuild.

I'm trying to install in a Docker container and am receiving this error message regardless of anything I tried.

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://nodejs.org/download/release/v6.2.2/node-v6.2.2-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: self signed certificate in certificate chain
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket. (_tls_wrap.js:1060:38)
gyp ERR! stack at emitNone (events.js:86:13)
gyp ERR! stack at TLSSocket.emit (events.js:185:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:584:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)
gyp ERR! System Linux 4.9.13-moby
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebu
ild"
gyp ERR! cwd /app/node_modules/pdf-fill-form
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm info lifecycle [email protected]~install: Failed to exec install script
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 4.9.13-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "[email protected]"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pdf-fill-form
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

#####THE npm-debug.log reads:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'pdf-fill-form' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /app/.npmrc. (matches userconfig)
5 silly loadCurrentTree Starting
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 silly fetchPackageMetaData pdf-fill-form
9 silly fetchNamedPackageData pdf-fill-form
10 silly mapToRegistry name pdf-fill-form
11 silly mapToRegistry using default registry
12 silly mapToRegistry registry http://ct-avs-web.es.ad.adp.com:4873/
13 silly mapToRegistry data Result {
13 silly mapToRegistry raw: 'pdf-fill-form',
13 silly mapToRegistry scope: null,
13 silly mapToRegistry name: 'pdf-fill-form',
13 silly mapToRegistry rawSpec: '',
13 silly mapToRegistry spec: 'latest',
13 silly mapToRegistry type: 'tag' }
14 silly mapToRegistry uri http://ct-avs-web.es.ad.adp.com:4873/pdf-fill-form
15 verbose request uri http://ct-avs-web.es.ad.adp.com:4873/pdf-fill-form
16 verbose request no auth needed
17 info attempt registry request try #1 at 6:36:17 AM
18 verbose request id 5e3f134d3638d64a
19 verbose etag "8696401a0e3fda649919bbdda1edc8bf"
20 http request GET http://ct-avs-web.es.ad.adp.com:4873/pdf-fill-form
21 http 200 http://ct-avs-web.es.ad.adp.com:4873/pdf-fill-form
22 verbose headers { 'x-powered-by': 'verdaccio/2.0.1',
22 verbose headers 'content-type': 'application/json; charset=utf-8',

Fatal error on npm install: 'poppler/qt4/poppler-form.h' file not found

I get this error when trying to npm install pdf-fill-form


[email protected] install /Users/.../node_modules/pdf-fill-form
node-gyp rebuild

CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePopplerAsync.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePoppler.o
../src/NodePoppler.cc:9:10: fatal error: 'poppler/qt4/poppler-form.h' file not
found

include <poppler/qt4/poppler-form.h>

     ^

1 error generated.
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"


I am using:

OS X El Capitan 10.11.5
NodeJS v4.5.0
npm 2.15.9

Dependencies installed using brew install qt4 cairo poppler --with-qt4. Same error occured before and after these installed.

Read only

Is there anyway to make the filled pdf not read only after being filled? Blank form fields cannot be filled in after using pdf-form-fill is there anything that can be done to fix this?

"Error: Invalid XRef entry"

I am trying to fill some forms on a pdf, as a note I have used both Hummus (another pdf library) and now trying to use this module to fill the form, I was able to successfully read the fields however when trying to write to it I get "Error: Invalid XRef entry", researching this error gave me some hints that the file may be damaged however it opens up and fills properly using Adobe Acrobat Pro.
I've attached the pdf file here fw4.pdf and my code is:

var formValues = { 'topmostSubform[0].Page3[0].f3_18[0]': 'Hello'};

pdfFillForm.write('./sample-forms/fw4.pdf', formValues, { "save": "pdf", 'cores': 4, 'scale': 0.2, 'antialias': true } )
.then(function(result) {
      fs.writeFile("Test.pdf", result, function(err) {
           if(err) {
	      return console.log('Yo: ', err);
           }
	  console.log("The file was saved!");
      });
}, function(err) {
     console.log('Um: ', err);
});

Changing font size?

Rendered text is too big for the container fields, and all the written characters are not visible. Is there a parameter I can pass into the writeAsync function that lowers the font size (and other characteristics like bolding, type, etc.)? In addition, is there a way to just overlay the text on the field instead of trying to fit it properly?

I saw that it was suggested to install poppler-data for better font support, but can't find anything elaborating on that. Thanks

ERROR/WARNING in ../~/pdf-fill-form/lib/pdf-fill-form.js

UPDATE: I get the same error on: https://runkit.com/npm/pdf-fill-form . If you try to read the test.pdf it gives the same error:

Error: Cannot find module '/app/available_modules/1488224754000/pdf-fill-form/lib/../build/default/pdf_fill_form'

So I am receiving this Warning/Error. They're both identical so I am copying the warning here. I removed the beginning of the file paths and started them at the node_modules folder:

WARNING in ../~/pdf-fill-form/lib/pdf-fill-form.js
Module not found: Error: Cannot resolve 'file' or 'directory' /node_modules/pdf-fill-form/lib/../build/Debug/pdf_fill_form in /node_modules/pdf-fill-form/lib
resolve file
  /node_modules/pdf-fill-form/build/Debug/pdf_fill_form doesn't exist
/node_modules/pdf-fill-form/build/Debug/pdf_fill_form.webpack.js doesn't exist
 /node_modules/pdf-fill-form/build/Debug/pdf_fill_form.web.js doesn't exist
 /node_modules/pdf-fill-form/build/Debug/pdf_fill_form.js doesn't exist
 /node_modules/pdf-fill-form/build/Debug/pdf_fill_form.json doesn't exist
resolve directory
  /node_modules/pdf-fill-form/build/Debug/pdf_fill_form doesn't exist (directory default file)
  /node_modules/pdf-fill-form/build/Debug/pdf_fill_form/package.json doesn't exist (directory description file)
[/node_modules/pdf-fill-form/build/Debug/pdf_fill_form]
[/node_modules/pdf-fill-form/build/Debug/pdf_fill_form.webpack.js]
[/node_modules/pdf-fill-form/build/Debug/pdf_fill_form.web.js]
[/node_modules/pdf-fill-form/build/Debug/pdf_fill_form.js]
[/node_modules/pdf-fill-form/build/Debug/pdf_fill_form.json]
 @ ../~/pdf-fill-form/lib/pdf-fill-form.js 41:42-93

When I look in the build folder there is no Debug or default file? Have I missed a step in the installation?

Produce non-form pdf

I'd be interested in using pdf-fill-form for filling out a form and then saving the result as a regular, non-form pdf. The result would be the same as filling out the form by hand and then printing to a file. Converting to an image is much too heavyweight.

Digital/Electronic Signatures

This is an excellent library! Just used it and it works great..

I would like to have this library handle filling in the digital/electronic signatures fields as well.

I ended up using a workaround by converting to html adding signature then converting back to PDF

anyway thanks again!! also this isnt really an issue but just a request.. couldnt find a spot to do that.

Error installing dependencies on Mac

When running this command: brew install qt5 cairo poppler --with-qt5 I get the error:

Error: invalid option: --with-qt5

Is there a new version of something that doesn't like this flag? I'm not able to install the module without passing this, as the npm install complains about not being able to find the required frameworks.

Error building in node 6.0.0

[email protected] install /home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form
node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory '/home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form/build'
CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
In file included from ../../nan/nan_new.h:190:0,
from ../../nan/nan.h:80,
from ../src/pdf-fill-form.cc:1:
../../nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBasev8::Signature::return_t NanIntern::Factoryv8::Signature::New(NanIntern::Factoryv8::Signature::FTH, int, NanIntern::Factoryv8::Signature::FTH_)’:
../../nan/nan_implementation_12_inl.h:181:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate_, NanIntern::Factoryv8::Signature::FTH&, int&, NanIntern::Factoryv8::Signature::FTH_&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
In file included from /home/pete/.node-gyp/6.0.0/include/node/node.h:42:0,
from ../../nan/nan.h:24,
from ../src/pdf-fill-form.cc:1:
/home/pete/.node-gyp/6.0.0/include/node/v8.h:4798:27: note: candidate: static v8::Localv8::Signature v8::Signature::New(v8::Isolate_, v8::Localv8::FunctionTemplate)
static Local New(
^
/home/pete/.node-gyp/6.0.0/include/node/v8.h:4798:27: note: candidate expects 2 arguments, 4 provided
In file included from ../src/pdf-fill-form.cc:1:0:
../../nan/nan.h: At global scope:
../../nan/nan.h:171:25: error: redefinition of ‘template v8::Local NanEnsureLocal(v8::Local)’
NAN_INLINE v8::Local NanEnsureLocal(v8::Local val) {
^
../../nan/nan.h:166:25: note: ‘template v8::Local NanEnsureLocal(v8::Handle)’ previously declared here
NAN_INLINE v8::Local NanEnsureLocal(v8::Handle val) {
^
../../nan/nan.h:376:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:376:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:377:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:382:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:382:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:387:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:387:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:388:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:393:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h:393:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h:564:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../../nan/nan.h:564:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char
, size_t, int)’:
../../nan/nan.h:568:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h:568:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char
, uint32_t)’:
../../nan/nan.h:575:67: error: invalid conversion from ‘const char
’ to ‘char’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../../nan/nan.h:25:0,
from ../src/pdf-fill-form.cc:1:
/home/pete/.node-gyp/6.0.0/include/node/node_buffer.h:46:40: note: initializing argument 2 of ‘v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, char_, size_t)’
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../src/pdf-fill-form.cc:1:0:
../../nan/nan.h:575:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((char_)data), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:579:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../../nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char_, uint32_t)’:
../../nan/nan.h:586:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
pdf_fill_form.target.mk:110: recipe for target 'Release/obj.target/pdf_fill_form/src/pdf-fill-form.o' failed
make: *** [Release/obj.target/pdf_fill_form/src/pdf-fill-form.o] Error 1
make: Leaving directory '/home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pete/.nvm/versions/node/v6.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.0-22-generic
gyp ERR! command "/home/pete/.nvm/versions/node/v6.0.0/bin/node" "/home/pete/.nvm/versions/node/v6.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form
gyp ERR! node -v v6.0.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/home/pete/.nvm/versions/node/v6.0.0/bin/node" "/home/pete/.nvm/versions/node/v6.0.0/bin/npm" "i" "--save" "pdf-fill-form"
npm ERR! node v6.0.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pdf-fill-form
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pete/projects/vizbotnz/pdfTesting/npm-debug.log

npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/home/pete/.nvm/versions/node/v6.0.0/bin/node',
1 verbose cli '/home/pete/.nvm/versions/node/v6.0.0/bin/npm',
1 verbose cli 'i',
1 verbose cli '--save',
1 verbose cli 'pdf-fill-form' ]
2 info using [email protected]
3 info using [email protected]
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData pdf-fill-form
8 silly fetchNamedPackageData pdf-fill-form
9 silly mapToRegistry name pdf-fill-form
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'pdf-fill-form',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry name: 'pdf-fill-form',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/pdf-fill-form
14 verbose request uri https://registry.npmjs.org/pdf-fill-form
15 verbose request no auth needed
16 info attempt registry request try #1 at 1:38:10 PM
17 verbose request id 6cb8c3257fc553be
18 verbose etag "8Y1Z9V5XE5N3YBU3G1RBQT4OA"
19 http request GET https://registry.npmjs.org/pdf-fill-form
20 http 304 https://registry.npmjs.org/pdf-fill-form
21 verbose headers { date: 'Tue, 24 May 2016 01:38:16 GMT',
21 verbose headers via: '1.1 varnish',
21 verbose headers 'cache-control': 'max-age=300',
21 verbose headers etag: '"8Y1Z9V5XE5N3YBU3G1RBQT4OA"',
21 verbose headers age: '109',
21 verbose headers connection: 'keep-alive',
21 verbose headers 'x-served-by': 'cache-wlg7321-WLG',
21 verbose headers 'x-cache': 'HIT',
21 verbose headers 'x-cache-hits': '1',
21 verbose headers 'x-timer': 'S1464053896.204723,VS0,VE0',
21 verbose headers vary: 'Accept-Encoding' }
22 silly get cb [ 304,
22 silly get { date: 'Tue, 24 May 2016 01:38:16 GMT',
22 silly get via: '1.1 varnish',
22 silly get 'cache-control': 'max-age=300',
22 silly get etag: '"8Y1Z9V5XE5N3YBU3G1RBQT4OA"',
22 silly get age: '109',
22 silly get connection: 'keep-alive',
22 silly get 'x-served-by': 'cache-wlg7321-WLG',
22 silly get 'x-cache': 'HIT',
22 silly get 'x-cache-hits': '1',
22 silly get 'x-timer': 'S1464053896.204723,VS0,VE0',
22 silly get vary: 'Accept-Encoding' } ]
23 verbose etag https://registry.npmjs.org/pdf-fill-form from cache
24 verbose get saving pdf-fill-form to /home/pete/.npm/registry.npmjs.org/pdf-fill-form/.cache.json
25 verbose correctMkdir /home/pete/.npm correctMkdir not in flight; initializing
26 silly install normalizeTree
27 silly loadCurrentTree Finishing
28 silly loadIdealTree Starting
29 silly install loadIdealTree
30 silly cloneCurrentTree Starting
31 silly install cloneCurrentTreeToIdealTree
32 silly cloneCurrentTree Finishing
33 silly loadShrinkwrap Starting
34 silly install loadShrinkwrap
35 silly loadShrinkwrap Finishing
36 silly loadAllDepsIntoIdealTree Starting
37 silly install loadAllDepsIntoIdealTree
38 silly resolveWithNewModule [email protected] checking installable status
39 silly cache add args [ 'pdf-fill-form', null ]
40 verbose cache add spec pdf-fill-form
41 silly cache add parsed spec Result {
41 silly cache add raw: 'pdf-fill-form',
41 silly cache add scope: null,
41 silly cache add name: 'pdf-fill-form',
41 silly cache add rawSpec: '',
41 silly cache add spec: 'latest',
41 silly cache add type: 'tag' }
42 silly addNamed pdf-fill-form@latest
43 verbose addNamed "latest" is being treated as a dist-tag for pdf-fill-form
44 info addNameTag [ 'pdf-fill-form', 'latest' ]
45 silly mapToRegistry name pdf-fill-form
46 silly mapToRegistry using default registry
47 silly mapToRegistry registry https://registry.npmjs.org/
48 silly mapToRegistry data Result {
48 silly mapToRegistry raw: 'pdf-fill-form',
48 silly mapToRegistry scope: null,
48 silly mapToRegistry name: 'pdf-fill-form',
48 silly mapToRegistry rawSpec: '',
48 silly mapToRegistry spec: 'latest',
48 silly mapToRegistry type: 'tag' }
49 silly mapToRegistry uri https://registry.npmjs.org/pdf-fill-form
50 verbose addNameTag registry:https://registry.npmjs.org/pdf-fill-form not in flight; fetching
51 verbose get https://registry.npmjs.org/pdf-fill-form not expired, no request
52 silly addNameTag next cb for pdf-fill-form with tag latest
53 silly addNamed [email protected]
54 verbose addNamed "1.1.0" is a plain semver version for pdf-fill-form
55 silly cache afterAdd [email protected]
56 verbose afterAdd /home/pete/.npm/pdf-fill-form/1.1.0/package/package.json not in flight; writing
57 verbose correctMkdir /home/pete/.npm correctMkdir not in flight; initializing
58 verbose afterAdd /home/pete/.npm/pdf-fill-form/1.1.0/package/package.json written
59 silly fetchNamedPackageData nan
60 silly mapToRegistry name nan
61 silly mapToRegistry using default registry
62 silly mapToRegistry registry https://registry.npmjs.org/
63 silly mapToRegistry data Result {
63 silly mapToRegistry raw: 'nan',
63 silly mapToRegistry scope: null,
63 silly mapToRegistry name: 'nan',
63 silly mapToRegistry rawSpec: '',
63 silly mapToRegistry spec: 'latest',
63 silly mapToRegistry type: 'tag' }
64 silly mapToRegistry uri https://registry.npmjs.org/nan
65 verbose request uri https://registry.npmjs.org/nan
66 verbose request no auth needed
67 info attempt registry request try #1 at 1:38:16 PM
68 verbose etag "24B26O57Z0ASCDVIYEYKA8KVW"
69 http request GET https://registry.npmjs.org/nan
70 http 304 https://registry.npmjs.org/nan
71 verbose headers { date: 'Tue, 24 May 2016 01:38:16 GMT',
71 verbose headers via: '1.1 varnish',
71 verbose headers 'cache-control': 'max-age=300',
71 verbose headers etag: '"24B26O57Z0ASCDVIYEYKA8KVW"',
71 verbose headers age: '176',
71 verbose headers connection: 'keep-alive',
71 verbose headers 'x-served-by': 'cache-wlg7321-WLG',
71 verbose headers 'x-cache': 'HIT',
71 verbose headers 'x-cache-hits': '7',
71 verbose headers 'x-timer': 'S1464053896.307669,VS0,VE0',
71 verbose headers vary: 'Accept-Encoding' }
72 silly get cb [ 304,
72 silly get { date: 'Tue, 24 May 2016 01:38:16 GMT',
72 silly get via: '1.1 varnish',
72 silly get 'cache-control': 'max-age=300',
72 silly get etag: '"24B26O57Z0ASCDVIYEYKA8KVW"',
72 silly get age: '176',
72 silly get connection: 'keep-alive',
72 silly get 'x-served-by': 'cache-wlg7321-WLG',
72 silly get 'x-cache': 'HIT',
72 silly get 'x-cache-hits': '7',
72 silly get 'x-timer': 'S1464053896.307669,VS0,VE0',
72 silly get vary: 'Accept-Encoding' } ]
73 verbose etag https://registry.npmjs.org/nan from cache
74 verbose get saving nan to /home/pete/.npm/registry.npmjs.org/nan/.cache.json
75 verbose correctMkdir /home/pete/.npm correctMkdir not in flight; initializing
76 silly resolveWithNewModule [email protected] checking installable status
77 silly cache add args [ 'nan@1.7.0', null ]
78 verbose cache add spec nan@1.7.0
79 silly cache add parsed spec Result {
79 silly cache add raw: 'nan@1.7.0',
79 silly cache add scope: null,
79 silly cache add name: 'nan',
79 silly cache add rawSpec: '1.7.0',
79 silly cache add spec: '>=1.7.0 <1.8.0',
79 silly cache add type: 'range' }
80 silly addNamed nan@>=1.7.0 <1.8.0
81 verbose addNamed ">=1.7.0 <1.8.0" is a valid semver range for nan
82 silly addNameRange { name: 'nan', range: '>=1.7.0 <1.8.0', hasData: false }
83 silly mapToRegistry name nan
84 silly mapToRegistry using default registry
85 silly mapToRegistry registry https://registry.npmjs.org/
86 silly mapToRegistry data Result {
86 silly mapToRegistry raw: 'nan',
86 silly mapToRegistry scope: null,
86 silly mapToRegistry name: 'nan',
86 silly mapToRegistry rawSpec: '',
86 silly mapToRegistry spec: 'latest',
86 silly mapToRegistry type: 'tag' }
87 silly mapToRegistry uri https://registry.npmjs.org/nan
88 verbose addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
89 verbose get https://registry.npmjs.org/nan not expired, no request
90 silly addNameRange number 2 { name: 'nan', range: '>=1.7.0 <1.8.0', hasData: true }
91 silly addNameRange versions [ 'nan',
91 silly addNameRange [ '0.3.0-wip',
91 silly addNameRange '0.3.0-wip2',
91 silly addNameRange '0.3.0',
91 silly addNameRange '0.3.1',
91 silly addNameRange '0.3.2',
91 silly addNameRange '0.4.0',
91 silly addNameRange '0.4.1',
91 silly addNameRange '0.4.2',
91 silly addNameRange '0.4.3',
91 silly addNameRange '0.4.4',
91 silly addNameRange '0.5.0',
91 silly addNameRange '0.5.1',
91 silly addNameRange '0.5.2',
91 silly addNameRange '0.6.0',
91 silly addNameRange '0.7.0',
91 silly addNameRange '0.7.1',
91 silly addNameRange '0.8.0',
91 silly addNameRange '1.0.0',
91 silly addNameRange '1.1.0',
91 silly addNameRange '1.1.1',
91 silly addNameRange '1.1.2',
91 silly addNameRange '1.2.0',
91 silly addNameRange '1.3.0',
91 silly addNameRange '1.4.0',
91 silly addNameRange '1.4.1',
91 silly addNameRange '1.5.0',
91 silly addNameRange '1.4.2',
91 silly addNameRange '1.4.3',
91 silly addNameRange '1.5.1',
91 silly addNameRange '1.5.2',
91 silly addNameRange '1.6.0',
91 silly addNameRange '1.5.3',
91 silly addNameRange '1.6.1',
91 silly addNameRange '1.6.2',
91 silly addNameRange '1.7.0',
91 silly addNameRange '1.8.0',
91 silly addNameRange '1.8.1',
91 silly addNameRange '1.8.2',
91 silly addNameRange '1.8.3',
91 silly addNameRange '1.8.4',
91 silly addNameRange '1.9.0',
91 silly addNameRange '2.0.0',
91 silly addNameRange '2.0.1',
91 silly addNameRange '2.0.2',
91 silly addNameRange '2.0.3',
91 silly addNameRange '2.0.4',
91 silly addNameRange '2.0.5',
91 silly addNameRange '2.0.6',
91 silly addNameRange '2.0.7',
91 silly addNameRange '2.0.8',
91 silly addNameRange '2.0.9',
91 silly addNameRange '2.1.0',
91 silly addNameRange '2.2.0',
91 silly addNameRange '2.2.1',
91 silly addNameRange '2.3.0',
91 silly addNameRange '2.3.1',
91 silly addNameRange '2.3.2',
91 silly addNameRange '2.3.3' ] ]
92 silly addNamed [email protected]
93 verbose addNamed "1.7.0" is a plain semver version for nan
94 silly cache afterAdd [email protected]
95 verbose afterAdd /home/pete/.npm/nan/1.7.0/package/package.json not in flight; writing
96 verbose correctMkdir /home/pete/.npm correctMkdir not in flight; initializing
97 verbose afterAdd /home/pete/.npm/nan/1.7.0/package/package.json written
98 silly loadAllDepsIntoIdealTree Finishing
99 silly idealTree:prePrune [email protected]
99 silly idealTree:prePrune ├── [email protected]
99 silly idealTree:prePrune └── [email protected]
100 silly loadIdealTree Finishing
101 silly currentTree [email protected]
102 silly idealTree [email protected]
102 silly idealTree ├── [email protected]
102 silly idealTree └── [email protected]
103 silly generateActionsToTake Starting
104 silly install generateActionsToTake
105 silly generateActionsToTake Finishing
106 silly diffTrees action count 2
107 silly diffTrees add [email protected]
108 silly diffTrees add [email protected]
109 silly decomposeActions action count 16
110 silly decomposeActions fetch [email protected]
111 silly decomposeActions extract [email protected]
112 silly decomposeActions test [email protected]
113 silly decomposeActions preinstall [email protected]
114 silly decomposeActions build [email protected]
115 silly decomposeActions install [email protected]
116 silly decomposeActions postinstall [email protected]
117 silly decomposeActions finalize [email protected]
118 silly decomposeActions fetch [email protected]
119 silly decomposeActions extract [email protected]
120 silly decomposeActions test [email protected]
121 silly decomposeActions preinstall [email protected]
122 silly decomposeActions build [email protected]
123 silly decomposeActions install [email protected]
124 silly decomposeActions postinstall [email protected]
125 silly decomposeActions finalize [email protected]
126 silly executeActions Starting
127 silly install executeActions
128 silly doSerial global-install 0
129 silly doParallel fetch 2
130 verbose correctMkdir /home/pete/.npm/_locks correctMkdir not in flight; initializing
131 verbose lock using /home/pete/.npm/_locks/staging-19c0fbaa13f3ee2f.lock for /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging
132 silly doParallel extract 2
133 silly extract [email protected]
134 silly extract [email protected]
135 verbose unbuild node_modules/.staging/nan-e0776163
136 verbose unbuild node_modules/.staging/pdf-fill-form-90870b12
137 silly gentlyRm /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163 is being purged from base /home/pete/projects/vizbotnz/pdfTesting
138 verbose gentlyRm don't care about contents; nuking /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163
139 silly gentlyRm /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12 is being purged from base /home/pete/projects/vizbotnz/pdfTesting
140 verbose gentlyRm don't care about contents; nuking /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12
141 verbose tar unpack /home/pete/.npm/nan/1.7.0/package.tgz
142 verbose tar unpacking to /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163
143 silly gentlyRm /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163 is being purged
144 verbose gentlyRm don't care about contents; nuking /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163
145 verbose tar unpack /home/pete/.npm/pdf-fill-form/1.1.0/package.tgz
146 verbose tar unpacking to /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12
147 silly gentlyRm /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12 is being purged
148 verbose gentlyRm don't care about contents; nuking /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12
149 silly gunzTarPerm modes [ '775', '664' ]
150 silly gunzTarPerm modes [ '775', '664' ]
151 silly gunzTarPerm extractEntry package.json
152 silly gunzTarPerm extractEntry package.json
153 silly gunzTarPerm modified mode [ 'package.json', 420, 436 ]
154 silly gunzTarPerm extractEntry include_dirs.js
155 silly gunzTarPerm extractEntry LICENSE.md
156 silly gunzTarPerm extractEntry .npmignore
157 silly gunzTarPerm modified mode [ '.npmignore', 420, 436 ]
158 silly gunzTarPerm extractEntry README.md
159 silly gunzTarPerm modified mode [ 'README.md', 420, 436 ]
160 silly gunzTarPerm extractEntry .dntrc
161 silly gunzTarPerm extractEntry appveyor.yml
162 silly gunzTarPerm extractEntry LICENSE
163 silly gunzTarPerm modified mode [ 'LICENSE', 420, 436 ]
164 silly gunzTarPerm extractEntry example.js
165 silly gunzTarPerm modified mode [ 'example.js', 420, 436 ]
166 silly gunzTarPerm extractEntry nan.h
167 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
168 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
169 silly gunzTarPerm extractEntry nan_new.h
170 silly gunzTarPerm extractEntry nan_string_bytes.h
171 silly gunzTarPerm extractEntry CHANGELOG.md
172 silly gunzTarPerm extractEntry binding.gyp
173 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 436 ]
174 silly gunzTarPerm extractEntry lib/pdf-fill-form.js
175 silly gunzTarPerm modified mode [ 'lib/pdf-fill-form.js', 420, 436 ]
176 silly gunzTarPerm extractEntry src/NodePoppler.cc
177 silly gunzTarPerm modified mode [ 'src/NodePoppler.cc', 420, 436 ]
178 silly gunzTarPerm extractEntry src/NodePoppler.h
179 silly gunzTarPerm modified mode [ 'src/NodePoppler.h', 420, 436 ]
180 silly gunzTarPerm extractEntry src/NodePopplerAsync.cc
181 silly gunzTarPerm modified mode [ 'src/NodePopplerAsync.cc', 420, 436 ]
182 silly gunzTarPerm extractEntry src/NodePopplerAsync.h
183 silly gunzTarPerm modified mode [ 'src/NodePopplerAsync.h', 420, 436 ]
184 silly gunzTarPerm extractEntry src/pdf-fill-form.cc
185 silly gunzTarPerm modified mode [ 'src/pdf-fill-form.cc', 420, 436 ]
186 silly gentlyRm /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163/node_modules is being purged
187 verbose gentlyRm don't care about contents; nuking /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163/node_modules
188 silly gentlyRm /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12/node_modules is being purged
189 verbose gentlyRm don't care about contents; nuking /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12/node_modules
190 silly doParallel preinstall 2
191 silly preinstall [email protected] /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163
192 info lifecycle [email protected]
preinstall: [email protected]
193 silly preinstall [email protected] /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12
194 info lifecycle [email protected]
preinstall: [email protected]
195 silly lifecycle [email protected]
preinstall: no script for preinstall, continuing
196 silly lifecycle [email protected]
preinstall: no script for preinstall, continuing
197 silly doReverseSerial remove 0
198 silly doSerial move 0
199 silly doSerial finalize 2
200 silly finalize /home/pete/projects/vizbotnz/pdfTesting/node_modules/nan
201 silly finalize /home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form
202 silly doSerial build 2
203 silly build [email protected]
204 info linkStuff [email protected]
205 silly linkStuff [email protected] has /home/pete/projects/vizbotnz/pdfTesting/node_modules as its parent node_modules
206 verbose linkBins [email protected]
207 verbose linkMans [email protected]
208 silly build [email protected]
209 info linkStuff [email protected]
210 silly linkStuff [email protected] has /home/pete/projects/vizbotnz/pdfTesting/node_modules as its parent node_modules
211 verbose linkBins [email protected]
212 verbose linkMans [email protected]
213 silly doSerial global-link 0
214 silly doParallel update-linked 0
215 silly doSerial install 2
216 silly install [email protected] /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/nan-e0776163
217 info lifecycle [email protected]install: [email protected]
218 silly lifecycle [email protected]
install: no script for install, continuing
219 silly install [email protected] /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging/pdf-fill-form-90870b12
220 info lifecycle [email protected]install: [email protected]
221 verbose lifecycle [email protected]
install: unsafe-perm in lifecycle true
222 verbose lifecycle [email protected]install: PATH: /home/pete/.nvm/versions/node/v6.0.0/lib/node_modules/npm/bin/node-gyp-bin:/home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form/node_modules/.bin:/home/pete/projects/vizbotnz/pdfTesting/node_modules/.bin:/home/pete/.nvm/versions/node/v6.0.0/bin:/home/pete/.rbenv/plugins/ruby-build/bin:/home/pete/.rbenv/shims:/home/pete/.nvm/versions/node/v6.0.0/bin:/home/pete/bin:/home/pete/npm/bin:/home/pete/.node/bin:/usr/local/heroku/bin:/home/pete/.rbenv/shims:/home/pete/.rbenv/bin:/home/pete/.rbenv/shims:/home/pete/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
223 verbose lifecycle [email protected]
install: CWD: /home/pete/projects/vizbotnz/pdfTesting/node_modules/pdf-fill-form
224 silly lifecycle [email protected]install: Args: [ '-c', 'node-gyp rebuild' ]
225 silly lifecycle [email protected]
install: Returned: code: 1 signal: null
226 info lifecycle [email protected]~install: Failed to exec install script
227 verbose unlock done using /home/pete/.npm/_locks/staging-19c0fbaa13f3ee2f.lock for /home/pete/projects/vizbotnz/pdfTesting/node_modules/.staging
228 silly rollbackFailedOptional Starting
229 silly rollbackFailedOptional Finishing
230 silly runTopLevelLifecycles Starting
231 silly runTopLevelLifecycles Finishing
232 silly install printInstalled
233 warn [email protected] No description
234 warn [email protected] No repository field.
235 verbose stack Error: [email protected] install: node-gyp rebuild
235 verbose stack Exit status 1
235 verbose stack at EventEmitter. (/home/pete/.nvm/versions/node/v6.0.0/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
235 verbose stack at emitTwo (events.js:106:13)
235 verbose stack at EventEmitter.emit (events.js:191:7)
235 verbose stack at ChildProcess. (/home/pete/.nvm/versions/node/v6.0.0/lib/node_modules/npm/lib/utils/spawn.js:24:14)
235 verbose stack at emitTwo (events.js:106:13)
235 verbose stack at ChildProcess.emit (events.js:191:7)
235 verbose stack at maybeClose (internal/child_process.js:850:16)
235 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
236 verbose pkgid [email protected]
237 verbose cwd /home/pete/projects/vizbotnz/pdfTesting
238 error Linux 4.4.0-22-generic
239 error argv "/home/pete/.nvm/versions/node/v6.0.0/bin/node" "/home/pete/.nvm/versions/node/v6.0.0/bin/npm" "i" "--save" "pdf-fill-form"
240 error node v6.0.0
241 error npm v3.8.6
242 error code ELIFECYCLE
243 error [email protected] install: node-gyp rebuild
243 error Exit status 1
244 error Failed at the [email protected] install script 'node-gyp rebuild'.
244 error Make sure you have the latest version of node.js and npm installed.
244 error If you do, this is most likely a problem with the pdf-fill-form package,
244 error not with npm itself.
244 error Tell the author that this fails on your system:
244 error node-gyp rebuild
244 error You can get information on how to open an issue for this project with:
244 error npm bugs pdf-fill-form
244 error Or if that isn't available, you can get their info via:
244 error npm owner ls pdf-fill-form
244 error There is likely additional logging output above.
245 verbose exit [ 1, true ]

Flatten pdf

Hi,

is there a way to flatten a pdf with this library?

Error: Cannot find module '/lib/../build/Release/pdf_fill_form'

Hi,
The script runs fine in command mode:
$ node show.js

But when I bundle modules with
$ browserify show.js > show-b.js

And then insert into html:
<!doctype html>

<title>show.php</title> <script type="text/javascript" src="show-b.js"></script>

I get the following errors in console:

Error: Cannot find module '/lib/../build/Release/pdf_fill_form'
at o (show-b.js:1)
at show-b.js:1
at show-b.js:47
at Object. (show-b.js:53)
at Object.2 (show-b.js:54)
at o (show-b.js:1)
at show-b.js:1
at Object.3../lib/pdf-fill-form.js (show-b.js:56)
at o (show-b.js:1)
at r (show-b.js:1)
show-b.js:1 Uncaught Error: Cannot find module '/lib/../build/default/pdf_fill_form'
at o (show-b.js:1)
at show-b.js:1
at show-b.js:51
at Object. (show-b.js:53)
at Object.2 (show-b.js:54)
at o (show-b.js:1)
at show-b.js:1
at Object.3../lib/pdf-fill-form.js (show-b.js:56)
at o (show-b.js:1)
at r (show-b.js:1)

OS: Ubuntu 18.04.1 LTS
Node.js v8.12.0

Any help here is much appreciated.

Error installing on Heroku

Hello,

I installed pdf-fill-form successfully on my ubuntu development machine. I'm trying to put my application into production on Heroku. I used the apt buildpack to install the apt dependencies (libpoppler-qt4-dev
and libcairo2-dev). When the node buildpack tries to build my app I get this error:

make: Entering directory `/tmp/build_f8d86dbb1672baf3914371f99bf0566f/node_modules/pdf-fill-form/build'
remote: CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
remote: In file included from ../src/pdf-fill-form.cc:2:0:
remote: ../src/NodePoppler.h:5:26: fatal error: QtCore/QBuffer: No such file or directory
remote: #include <QtCore/QBuffer>
remote: ^
remote: compilation terminated.

If you can give me some hint on how to get out of this problem, I would appreciate it a lot.
Thank you in advance for your help.

Error installing on OSX 10.9.5 on Node 0.12.7

[email protected] install /Users/tyleriguchi/makapen/nano-string-middleware/node_modules/pdf-fill-form
node-gyp rebuild

CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
../src/pdf-fill-form.cc:13:16: error: use of undeclared identifier 'NanNew'
exports->Set(NanNew("readSync"),
^
../src/pdf-fill-form.cc:13:23: error: 'String' does not refer to a value
exports->Set(NanNew("readSync"),
^
/Users/tyleriguchi/.node-gyp/0.12.7/deps/v8/include/v8.h:1599:17: note:
declared here
class V8_EXPORT String : public Primitive {
^
../src/pdf-fill-form.cc:16:16: error: use of undeclared identifier 'NanNew'
exports->Set(NanNew("writeSync"),
^
../src/pdf-fill-form.cc:16:23: error: 'String' does not refer to a value
exports->Set(NanNew("writeSync"),
^
/Users/tyleriguchi/.node-gyp/0.12.7/deps/v8/include/v8.h:1599:17: note:
declared here
class V8_EXPORT String : public Primitive {
^
../src/pdf-fill-form.cc:19:16: error: use of undeclared identifier 'NanNew'
exports->Set(NanNew("writeAsync"),
^
../src/pdf-fill-form.cc:19:23: error: 'String' does not refer to a value
exports->Set(NanNew("writeAsync"),
^
/Users/tyleriguchi/.node-gyp/0.12.7/deps/v8/include/v8.h:1599:17: note:
declared here
class V8_EXPORT String : public Primitive {
^
6 errors generated.
make: *** [Release/obj.target/pdf_fill_form/src/pdf-fill-form.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/tyleriguchi/makapen/nano-string-middleware/node_modules/pdf-fill-form
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.12.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.

Getting an error when trying to install.

I've followed the instructions for installation and I'm receiving the following error

Russells-MacBook-Air:affiliation russell$ npm install pdf-fill-form --save
\

[email protected] install /Users/russell/Projects/affiliation/node_modules/pdf-fill-form
node-gyp rebuild

CXX(target) Release/obj.target/pdf_fill_form/src/pdf-fill-form.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePopplerAsync.o
CXX(target) Release/obj.target/pdf_fill_form/src/NodePoppler.o
../src/NodePoppler.cc:9:10: fatal error: 'poppler/qt4/poppler-form.h' file not
found

include <poppler/qt4/poppler-form.h>

     ^

1 error generated.
make: *** [Release/obj.target/pdf_fill_form/src/NodePoppler.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/russell/Projects/affiliation/node_modules/pdf-fill-form
gyp ERR! node -v v0.12.3
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "pdf-fill-form" "--save"
npm ERR! node v0.12.3
npm ERR! npm v2.9.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pdf-fill-form package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pdf-fill-form
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/russell/Projects/affiliation/npm-debug.log

Feature request: Field format support

Some PDF fields need to adhere to a specific format. For example, if you manually try to enter to a field, Adobe Reader may yell The value entered does not match the format of the field = "99 99 99". This format can be anything, so it's impossible to hardcode in the code.

At the moment, pdf-fill-form just enters whatever string you provide to it to the pdf, and it's not formatted. However, when you enter it manually via Adobe Reader, it gets automatically formatted -- spaces are added automatically.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.