tpisto / pdf-fill-form

Fill PDF forms and return either filled PDF or PDF created from rendered page images.
MIT License
227 stars 48 forks source link

What does scale do? #84

Open mobileben opened 4 years ago

mobileben commented 4 years ago

I've tried number values for scale, including 0, but I don't notice any changes to the resulting written PDF. What does it do? I looked at the .cc files, and it does indeed seem they are consumed.

Does scale work or am I simply using it wrong?

An example of what I'm doing is here. Note I'm using Typescript so had to use any in places to transpile.

pdfFillForm.write('test.pdf', { "name_first": "John", "name_last": "Doe" }, { "save": "pdf", 'cores': 4, 'scale': 0.2, 'antialias': true, 'startPage': 1, 'endPage': 2 })
    .then((result: any) => {
        fs.writeFile("output.pdf", result, (err: any) => {
            if (!err) {
                console.log("Done")
            } else {
                    console.log("Error")
            }
        });
    }, (err: any) => {
        console.log("Error")
    });