diff options
author | Hakim El Hattab | 2018-08-01 10:34:55 +0200 |
---|---|---|
committer | Hakim El Hattab | 2018-08-01 10:34:55 +0200 |
commit | b6aa0cac2392d69c93bda583c88cb6c4fd82b095 (patch) | |
tree | 4adab8ecbbce1db6a785700503d142dbad04c735 /plugin/print-pdf/print-pdf.js | |
parent | f6f7f58537c21435c4e2ffe8b538216eeac16ae4 (diff) | |
parent | b9bb353a11bb7bcd1f79a40a80e0d5dfcca05591 (diff) |
Merge branch 'dev' of github.com:hakimel/reveal.js
Diffstat (limited to 'plugin/print-pdf/print-pdf.js')
-rw-r--r-- | plugin/print-pdf/print-pdf.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugin/print-pdf/print-pdf.js b/plugin/print-pdf/print-pdf.js index 15ce43e..f62aedc 100644 --- a/plugin/print-pdf/print-pdf.js +++ b/plugin/print-pdf/print-pdf.js @@ -42,28 +42,26 @@ probePage.open( inputFile, function( status ) { printPage.open( inputFile, function( status ) { console.log( 'Export PDF: Preparing pdf [3/4]') - printPage.evaluate(function() { + printPage.evaluate( function() { Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom ); - }); + } ); } ); - printPage.onCallback = function(data) { + printPage.onCallback = function( data ) { // For some reason we need to "jump the queue" for syntax highlighting to work. // See: http://stackoverflow.com/a/3580132/129269 - setTimeout(function() { + setTimeout( function() { console.log( 'Export PDF: Writing file [4/4]' ); printPage.render( outputFile ); console.log( 'Export PDF: Finished successfully!' ); phantom.exit(); - }, 0); + }, 0 ); }; } else { - console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); - phantom.exit(1); + console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); + phantom.exit( 1 ); - } + } } ); - - |