javascript - SlimerJs PDF Render to file -
i looking @ slimerjs (v0.9.6) option rendering pdfs. have marked html pdf should rendered , run command render out:
slimerjs renderpdf.js
in renderpdf.js
file have defined:
var webpage = require('webpage').create(); webpage .open('page.html') // loads page .then(function() { webpage.viewportsize = { width: 1240, height: 1754 }; webpage.render('page.pdf', { format:'pdf', onlyviewport:true }); slimer.exit(); });
i see window open html page rendered expected doesn't render defined file, page.pdf
. there missing render out file? or perhaps there's known issue around this? appreciated :)
please note in order print webpage pdf slimer js requires cups pdf. install cups pdf command render page local file. , higher version 0.9.6 needed (0.10.*).
sudo apt-get install cups-pdf
Comments
Post a Comment