From 2ac0a55ccf0e8f881ff48f3500865bff37ec6fa3 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab <hakim.elhattab@gmail.com>
Date: Tue, 29 Apr 2014 13:30:56 +0200
Subject: [PATCH] ensure pdf pages are never zero-height

---
 css/print/pdf.css | 1 +
 js/reveal.js      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/css/print/pdf.css b/css/print/pdf.css
index e43d05c..7bcc6cb 100644
--- a/css/print/pdf.css
+++ b/css/print/pdf.css
@@ -119,6 +119,7 @@ ul, ol, div, p {
 	margin: 0 !important;
 	padding: 0 !important;
 	box-sizing: border-box !important;
+	min-height: 1px;
 
 	opacity: 1 !important;
 
diff --git a/js/reveal.js b/js/reveal.js
index 4e8f9f2..6e6c12b 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -468,7 +468,7 @@
 					top = ( pageHeight - slideHeight ) / 2;
 
 				var contentHeight = getAbsoluteHeight( slide );
-				var numberOfPages = Math.ceil( contentHeight / pageHeight );
+				var numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
 
 				// Center slides vertically
 				if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {
-- 
GitLab