Closed hmtri1011 closed 7 years ago
I had this error when using the Generate FDF Template from PDF example.
Then I saw your latest commit in index.js so I removed this line (line 100) return callback(null, convFieldJson2FDF(_form_fields));
return callback(null, convFieldJson2FDF(_form_fields));
and replace it with your previous code
var _keys = _.pluck(_form_fields, 'title'), _values = _.pluck(_form_fields, 'fieldValue'), jsonObj = _.zipObject(_keys, _values); return callback(null, jsonObj);
var _keys = _.pluck(_form_fields, 'title'),
_values = _.pluck(_form_fields, 'fieldValue'),
jsonObj = _.zipObject(_keys, _values);
return callback(null, jsonObj);
It worked again. Please check it!
Edit 1 : I used todust 's code on pull request and it worked! Edit 2 : mapForm2PDF example does not work for me my code :
const mapTest = { "name": "First Name" } const userObject = { "name": "MTae" }; pdfFiller.mapForm2PDF(userObject, mapTest, function (err, mappedFields) { if (err) throw err; console.log(mappedFields); });
But it does not show anything
Fixed in pull request #44
Published to npm v0.0.10
I had this error when using the Generate FDF Template from PDF example.
Then I saw your latest commit in index.js so I removed this line (line 100)
return callback(null, convFieldJson2FDF(_form_fields));
and replace it with your previous code
var _keys = _.pluck(_form_fields, 'title'),
_values = _.pluck(_form_fields, 'fieldValue'),
jsonObj = _.zipObject(_keys, _values);
return callback(null, jsonObj);
It worked again. Please check it!
Edit 1 : I used todust 's code on pull request and it worked! Edit 2 : mapForm2PDF example does not work for me my code :
But it does not show anything