phantom export throws error if reveal.js isn't present
This commit is contained in:
		| @@ -31,9 +31,11 @@ probePage.open( inputFile, function( status ) { | ||||
| 		return Reveal.getConfig(); | ||||
| 	} ); | ||||
|  | ||||
| 	if( config ) { | ||||
|  | ||||
| 		printPage.paperSize = { | ||||
| 		width: config.width * ( 1 + config.margin ), | ||||
| 		height: config.height * ( 1 + config.margin ), | ||||
| 			width: Math.floor( config.width * ( 1 + config.margin ) ), | ||||
| 			height: Math.floor( config.height * ( 1 + config.margin ) ), | ||||
| 			border: 0 | ||||
| 		}; | ||||
|  | ||||
| @@ -46,6 +48,14 @@ probePage.open( inputFile, function( status ) { | ||||
| 			}, 1000 ); | ||||
| 		} ); | ||||
|  | ||||
| 	} | ||||
| 	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); | ||||
|  | ||||
|     } | ||||
|  | ||||
| } ); | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user