limit size of media elements when printing to pdf

edit
Hakim El Hattab 2014-05-04 08:29:45 +02:00
parent da1f221b4f
commit 54e256764c
2 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,6 @@ ul, ol, div, p {
}
.reveal img {
box-shadow: none;
max-height: 80%;
}
.reveal .roll {
overflow: visible;

View File

@ -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';