Skip to content

Commit

Permalink
DEBUG: Generate PDF and PNG screenshots for overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Mar 23, 2016
1 parent 876cb07 commit b57513b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rendersvgs.js
Expand Up @@ -44,10 +44,11 @@ page.onCallback = function(result) {
/* out = fs.open(output + ".html", { mode: "w", charset: "UTF-8" });
out.write(page.content);
out.close();
*/
page.evaluate(function() {document.getElementsByTagName('body')[0].style.zoom = 0.62;});
page.paperSize = "A4";
page.render(output + ".pdf"); */
page.paperSize = { format: "A4", orientation: "portrait", margin: "6pt" };
page.render(output.replace(/.svg$/, ".pdf"));
page.render(output.replace(/.svg$/, ".png"));

phantom.exit();
};
Expand Down

0 comments on commit b57513b

Please sign in to comment.