diff options
author | Sean Parent | 2018-04-13 07:55:02 -0700 |
---|---|---|
committer | GitHub | 2018-04-13 07:55:02 -0700 |
commit | 97c1a0ecc1bf729dbe227ed0a3af0bfd3bc38613 (patch) | |
tree | 4fd0f338f0f58a46f213daaaa4744df4980bf45b /plugin/print-pdf/print-pdf.js | |
parent | 64b2a27455240e57c2cc1a90300391a3c3b91e28 (diff) | |
parent | 397feab8b4be5f8445ebb05808b507248188d4fe (diff) |
Merge branch 'dev' into master
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 ); - } + } } ); - - |