limit size of media elements when printing to pdf
This commit is contained in:
		| @@ -142,7 +142,6 @@ ul, ol, div, p { | |||||||
| } | } | ||||||
| .reveal img { | .reveal img { | ||||||
| 	box-shadow: none; | 	box-shadow: none; | ||||||
| 	max-height: 80%; |  | ||||||
| } | } | ||||||
| .reveal .roll { | .reveal .roll { | ||||||
| 	overflow: visible; | 	overflow: visible; | ||||||
|   | |||||||
| @@ -461,6 +461,9 @@ | |||||||
| 		// Let the browser know what page size we want to print | 		// Let the browser know what page size we want to print | ||||||
| 		injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' ); | 		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.classList.add( 'print-pdf' ); | ||||||
| 		document.body.style.width = pageWidth + 'px'; | 		document.body.style.width = pageWidth + 'px'; | ||||||
| 		document.body.style.height = pageHeight + 'px'; | 		document.body.style.height = pageHeight + 'px'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user