aboutsummaryrefslogtreecommitdiff
path: root/plugin/print-pdf
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-06-18 21:55:01 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-06-18 21:55:23 -0400
commit7e8ee5340e6615e8dce9c5b0bf0af8dcf699e4fa (patch)
treea6d7b72abc2bea82e17d172cd4019ebe59fb9605 /plugin/print-pdf
parent789a196e8f0a9645c761962ee5da56d607c44848 (diff)
downloadfosdem-2018-presentation-7e8ee5340e6615e8dce9c5b0bf0af8dcf699e4fa.tar
fosdem-2018-presentation-7e8ee5340e6615e8dce9c5b0bf0af8dcf699e4fa.tar.gz
update phanomjs pdf printing to work with latest pdf css
Diffstat (limited to 'plugin/print-pdf')
-rw-r--r--plugin/print-pdf/print-pdf.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugin/print-pdf/print-pdf.js b/plugin/print-pdf/print-pdf.js
index 2b1d691..6b6cad6 100644
--- a/plugin/print-pdf/print-pdf.js
+++ b/plugin/print-pdf/print-pdf.js
@@ -11,8 +11,13 @@
var page = new WebPage();
var system = require( 'system' );
+page.viewportSize = {
+ width: 1024,
+ height: 768
+};
+
page.paperSize = {
- format: 'A4',
+ format: 'letter',
orientation: 'landscape',
margin: {
left: '0',
@@ -21,7 +26,6 @@ page.paperSize = {
bottom: '0'
}
};
-page.zoomFactor = 1.5;
var revealFile = system.args[1] || 'index.html?print-pdf';
var slideFile = system.args[2] || 'slides.pdf';
@@ -36,4 +40,5 @@ page.open( revealFile, function( status ) {
console.log( 'Printed succesfully' );
page.render( slideFile );
phantom.exit();
-} ); \ No newline at end of file
+} );
+