update phanomjs pdf printing to work with latest pdf css

This commit is contained in:
Hakim El Hattab 2013-06-18 21:55:01 -04:00
parent 789a196e8f
commit 7e8ee5340e

View File

@ -11,8 +11,13 @@
var page = new WebPage(); var page = new WebPage();
var system = require( 'system' ); var system = require( 'system' );
page.viewportSize = {
width: 1024,
height: 768
};
page.paperSize = { page.paperSize = {
format: 'A4', format: 'letter',
orientation: 'landscape', orientation: 'landscape',
margin: { margin: {
left: '0', left: '0',
@ -21,7 +26,6 @@ page.paperSize = {
bottom: '0' bottom: '0'
} }
}; };
page.zoomFactor = 1.5;
var revealFile = system.args[1] || 'index.html?print-pdf'; var revealFile = system.args[1] || 'index.html?print-pdf';
var slideFile = system.args[2] || 'slides.pdf'; var slideFile = system.args[2] || 'slides.pdf';
@ -37,3 +41,4 @@ page.open( revealFile, function( status ) {
page.render( slideFile ); page.render( slideFile );
phantom.exit(); phantom.exit();
} ); } );