 +  SimpleDocument(const char* buf, size_t length);
 +  ~SimpleDocument();
 +  void RenderPage(size_t page, bool printing, cairo_t* cairo);
++  int GetNumPages();
++  // Uses PDF crop box:
++  double GetPageWidth(int page);
++  double GetPageHeight(int page);
++
 + private:
 +  char* buf_copy_;
-+  MemStream* stream_;
 +  PDFDoc* doc_;
 +  CairoOutputDev* out_dev_;
 +  void* initer_;

 namespace poppler
 {
 
@@ -99,6 +105,19 @@ private:
     friend class document_private;
 };
 

 @BUILD_LIBTIFF_TRUE@libtiff_includes = $(LIBTIFF_CFLAGS)
 @BUILD_LIBOPENJPEG_TRUE@libjpeg2000_includes = $(LIBOPENJPEG_CFLAGS)
diff --git a/cpp/poppler-document.cpp b/cpp/poppler-document.cpp
index 1c24b47..0a948bd 100644
--- a/cpp/poppler-document.cpp
+++ b/cpp/poppler-document.cpp
@@ -30,6 +30,7 @@
