[poppler] poppler/poppler: Catalog.cc,1.6,1.7 Catalog.h,1.4,1.5

Jonathan Blandford jrb at freedesktop.org
Sat Apr 16 11:57:46 PDT 2005


Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv30513/poppler

Modified Files:
	Catalog.cc Catalog.h 
Log Message:
Sat Apr 16 14:53:15 2005  Jonathan Blandford  <jrb at redhat.com>

        * glib/Makefile.am: Create poppler-enums.[ch]

        * glib/poppler.h:
        * glib/poppler-page.cc:
        * glib/poppler-page.h:
        * glib/poppler-action.h: Try to clean up the headers a bit

        * glib/poppler-document.cc:
        * glib/poppler-document.h: Add support for document data.
        Implemented as a lot of GObject properties.

        * glib/poppler-enums.c:
        * glib/poppler-enums.h: New autogenerated files.

        * glib/test-poppler-glib.c: Test the new document metadata.  Seems
        to work nicely, other than the PDF string and View Prefs.

        * poppler/Catalog.cc:
        * poppler/Catalog.h: Extend to support PageLayout.



Index: Catalog.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Catalog.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Catalog.cc	30 Mar 2005 18:43:44 -0000	1.6
+++ Catalog.cc	16 Apr 2005 18:57:44 -0000	1.7
@@ -121,6 +121,23 @@
   }
   obj.free();
 
+  pageLayout = pageLayoutNone;
+  if (catDict.dictLookup("PageLayout", &obj)->isName()) {
+    if (obj.isName("SinglePage"))
+      pageLayout = pageLayoutSinglePage;
+    if (obj.isName("OneColumn"))
+      pageLayout = pageLayoutOneColumn;
+    if (obj.isName("TwoColumnLeft"))
+      pageLayout = pageLayoutTwoColumnLeft;
+    if (obj.isName("TwoColumnRight"))
+      pageLayout = pageLayoutTwoColumnRight;
+    if (obj.isName("TwoPageLeft"))
+      pageLayout = pageLayoutTwoPageLeft;
+    if (obj.isName("TwoPageRight"))
+      pageLayout = pageLayoutTwoPageRight;
+  }
+  obj.free();
+
   // read base URI
   if (catDict.dictLookup("URI", &obj)->isDict()) {
     if (obj.dictLookup("Base", &obj2)->isString()) {

Index: Catalog.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Catalog.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Catalog.h	22 Mar 2005 22:46:37 -0000	1.4
+++ Catalog.h	16 Apr 2005 18:57:44 -0000	1.5
@@ -107,9 +107,19 @@
     pageModeFullScreen,
     pageModeOC
   };
+  enum PageLayout {
+    pageLayoutNone,
+    pageLayoutSinglePage,
+    pageLayoutOneColumn,
+    pageLayoutTwoColumnLeft,
+    pageLayoutTwoColumnRight,
+    pageLayoutTwoPageLeft,
+    pageLayoutTwoPageRight,
+  };
 
   // Returns the page mode.
   PageMode getPageMode() { return pageMode; }
+  PageLayout getPageLayout() { return pageLayout; }
 
 private:
 
@@ -127,6 +137,7 @@
   GBool ok;			// true if catalog is valid
   PageLabelInfo *pageLabelInfo; // info about page labels
   PageMode pageMode;		// page mode
+  PageLayout pageLayout;	// page layout
 
   int readPageTree(Dict *pages, PageAttrs *attrs, int start);
   Object *findDestInTree(Object *tree, GooString *name, Object *obj);



More information about the poppler mailing list