 +    d->cairo_output_dev->setPrinting(printing);
 +
 +    cairo_save(typed_cr);
-+    printf("calling display page slice for page %d (1 idx)\n", pp->index + 1);
 +    pdfdoc->displayPageSlice(d->cairo_output_dev, pp->index + 1,
 +                             xres, yres, int(rotate) * 90,
 +                             gFalse, gTrue, printing,

+                                      int x, int y, int w, int h,
+                                      rotation_enum rotate)
+{
+    printf("called cairo_render_page\n");
+#ifdef HAVE_CAIRO
+    if (!p) {
+        printf("missing page in cairo render\n");

 #ifdef VMS
   needParent = strchr(path->getCString(), '[') != NULL;
 #endif
diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc
index c620529..17d8ca1 100644
--- a/poppler/Lexer.cc
