prevent pages from overflowing when printing to pdf
This commit is contained in:
		| @@ -597,6 +597,15 @@ | |||||||
| 					top = Math.max( ( pageHeight - contentHeight ) / 2, 0 ); | 					top = Math.max( ( pageHeight - contentHeight ) / 2, 0 ); | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
|  | 				// Wrap the slide in a page element and hide its overflow | ||||||
|  | 				// so that no page ever flows onto another | ||||||
|  | 				var page = document.createElement( 'div' ); | ||||||
|  | 				page.className = 'page'; | ||||||
|  | 				page.style.overflow = 'hidden'; | ||||||
|  | 				page.style.height = ( pageHeight * numberOfPages ) + 'px'; | ||||||
|  | 				slide.parentNode.insertBefore( page, slide ); | ||||||
|  | 				page.appendChild( slide ); | ||||||
|  |  | ||||||
| 				// Position the slide inside of the page | 				// Position the slide inside of the page | ||||||
| 				slide.style.left = left + 'px'; | 				slide.style.left = left + 'px'; | ||||||
| 				slide.style.top = top + 'px'; | 				slide.style.top = top + 'px'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user