jsreport with phantom-pdf recipe: how / where to set basic settings like format, margin, orientation...? -
i'm using jsreport (through npm) render pdf html using phantom-pdf recipe.
rendering started via https call:
...and post data string one:
{ "template": { "content": /*...my html content template render...*/, "recipe": "phantom-pdf", "engine": "handlebars" }, "data": /*json string data pass template*/ }
i know there basic settings phantom-pdf (margin, format, width, height, orientation, printdelay, waitforjs), didn't understand put them: - in html template? - in dev.conig.json file of jsreport? - in separate file?
...and how?
thank in advance!
you can send these settings part of api request body, inside template.phantom
property.
{ "template": { "content": /*...my html content template render...*/, "recipe": "phantom-pdf", "engine": "handlebars", "phantom": { "margin": "5cm" } }, "data": { "foo": "hello" } }
Comments
Post a Comment