diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-05-04 08:29:45 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-05-04 08:29:45 +0200 |
commit | 54e256764ce98204caad708b654f6250fb781664 (patch) | |
tree | bf457f7ed2bdc743b72234b61d6139b839b1b2d8 /js | |
parent | da1f221b4f1ad11edf4099d651cb56e7fae79db0 (diff) | |
download | perl-software-in-gnu-guix-54e256764ce98204caad708b654f6250fb781664.tar perl-software-in-gnu-guix-54e256764ce98204caad708b654f6250fb781664.tar.gz |
limit size of media elements when printing to pdf
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index 49b2e7c..ad332a3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -461,6 +461,9 @@ // Let the browser know what page size we want to print injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' ); + // Limit the size of certain elements to the dimensions of the slide + injectStyleSheet( '.reveal img, .reveal video, .reveal iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' ); + document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; document.body.style.height = pageHeight + 'px'; |