Skip to content
Snippets Groups Projects
Commit 5868becf authored by Manuel Bieh's avatar Manuel Bieh
Browse files

Added phantomjs scriptfile for easier printing

parent 519ee268
No related merge requests found
// html2pdf.js
var page = new WebPage();
var system = require("system");
page.paperSize = {
format: "A4",
orientation: "landscape",
margin: {
left:"0",
right:"0",
top:"0",
bottom:"0"
}
};
page.zoomFactor = 1.5;
var revealFile = system.args[1] || 'index.html?print-pdf';
var slideFile = system.args[2] || 'slides.pdf';
if(slideFile.length - 4 != slideFile.lastIndexOf('.pdf')) {
slideFile += '.pdf';
}
page.open(revealFile, function (status) {
page.render(slideFile);
phantom.exit();
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment