Closed postama closed 7 years ago
1.npm install phantomjs-prebuilt
{
template: {
phantom: {
customPhantomJS: true
}
}
}
Is there a way to do this globally for the instance of jsreport server as apposed to per template
This can be done using custom script
function beforeRender(req, res, done) {
if (req.template.recipe === 'phantom-pdf') {
req.template.phantom = req.template.phantom || {}
req.template.phantom.customPhantomJS = true
}
done()
}
Mark it as global in studio and it will do the job for all templates.
jsreport-phantom-pdf@1.3.0 now has global setting for this
"phantom": {
"defaultPhantomjsVersion": "2.1.1"
}
The macOs sierra problem is also noted in the docs now http://jsreport.net/learn/phantom-pdf#macos-sierra
With the macOS Sierra upgrade, phantom 1 is not working. How can we use this package with phantom 2.x?