SlimerJs PDF Render to file
I am considering SlimerJs (v0.9.6) as an option for rendering PDF files. I have highlighted the HTML from which the PDF is to be made and I run this command to display it:
slimerjs renderPdf.js
In my renderPdf.js
file I have defined:
var webpage = require('webpage').create();
webpage
.open('page.html') // loads a page
.then(function() {
webpage.viewportSize = { width: 1240, height: 1754 };
webpage.render('page.pdf', {
format:'pdf',
onlyViewport:true
});
slimer.exit();
});
I see that the window is open with the HTML-page displayed exactly as expected, but it does not display the specific file page.pdf
. Is there something I am missing to get it to display the file? Or maybe there is a known issue? Any help is greatly appreciated :)
+3
source to share