File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -412,13 +412,18 @@ var Reveal = (function(){
412
412
*/
413
413
function setupPDF ( ) {
414
414
415
+ // The aspect ratio of pages when saving to PDF in Chrome,
416
+ // we need to abide by this ratio when determining the pixel
417
+ // size of our pages
418
+ var pageAspectRatio = 1.295 ;
419
+
415
420
// Dimensions of the PDF pages
416
- var pageWidth = 1122 ,
417
- pageHeight = 867 ;
421
+ var pageWidth = config . width * 1.3 ,
422
+ pageHeight = Math . round ( pageWidth / pageAspectRatio ) ;
418
423
419
424
// Dimensions of slides within the pages
420
- var slideWidth = 960 ,
421
- slideHeight = 700 ;
425
+ var slideWidth = config . width ,
426
+ slideHeight = config . height ;
422
427
423
428
document . body . classList . add ( 'print-pdf' ) ;
424
429
document . body . style . width = pageWidth + 'px' ;
You can’t perform that action at this time.
0 commit comments