--- libdocument/ev-document-misc.c.orig	2014-11-28 15:43:40.531413445 +0000
+++ libdocument/ev-document-misc.c	2014-11-28 15:46:24.915173966 +0000
@@ -517,7 +517,13 @@
 	/*diagonal in inches*/
 	di = hypot (gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm (screen)) / 25.4;
 
-	return (dp / di);
+	/* If dp or di fails to return a valid value then return default 96 DPI,
	 * Otherwise (dp / di) can result in infinity, NaN or zero DPI
	 */
+	if ((dp <= 0) || (di <= 0))
+		return (96.0);
+	else
+		return (dp / di);
 }
 
 /* Returns a locale specific date and time representation */
