pdffillerjs / pdffiller

Take an existing PDF Form and data and PDF Filler will create a new PDF with all given fields populated.
MIT License
286 stars 113 forks source link

Unknown characters in resulting pdf #58

Open rastkojokic opened 7 years ago

rastkojokic commented 7 years ago

Hey guys, trying to do a proof of concept filling out pdf form.

This is my code:

var pdfFiller   = require('pdffiller');
var sourcePDF = "tmp/pdf-forms/form-1.pdf";
var destinationPDF =  "tmp/created-pdf-forms/filled-form-1.pdf";

var data = {
    "q19_title19": "Some title",
    "q27_company27": "Foo Bar Company"
};

console.log('Start filling');
pdfFiller.fillForm(sourcePDF, destinationPDF, data, function(err) {

    if (err) {
        console.log(err);
        throw err;
    }

    console.log("Form filled successfully");
});

And the resulting document is this:

screen shot 2017-03-31 at 12 47 47 pm
maximilianschmidt commented 7 years ago

Hi there,

Maybe try changing the font of the form fields (in adobe right click form field -> settings -> appearance). That helped me when i encountered a problem with the rendered text.

However i am encountering a (maybe) related problem:, opened an issue here https://github.com/pdffillerjs/pdffiller/issues/59

satyajitnayk commented 3 months ago

Yes, by changing font of a fillable field to a commonly available font such as Helvatica it works just fine.

image