[poppler] poppler/PDFDoc.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Feb 2 15:31:51 PST 2012


 poppler/PDFDoc.cc |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e424a13bb516464d59ad76fd0933e92f3307b21b
Author: Thomas Freitag <Thomas.Freitag at kabelmail.de>
Date:   Fri Feb 3 00:12:10 2012 +0100

    pdfseparate fixes by Thomas after his last commit

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 0932d84..a0a19b9 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1340,10 +1340,16 @@ void PDFDoc::replacePageDict(int pageNo, int rotate,
 
 void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset) 
 {
+  pageDict->remove("Names");
+  pageDict->remove("OpenAction");
+  pageDict->remove("Outlines");
+  pageDict->remove("StructTreeRoot");
+
   for (int n = 0; n < pageDict->getLength(); n++) {
     const char *key = pageDict->getKey(n);
     Object value; pageDict->getValNF(n, &value);
-    if (strcmp(key, "Parent") != 0) {
+    if (strcmp(key, "Parent") != 0 &&
+	      strcmp(key, "Pages") != 0) {
       markObject(&value, xRef, countRef, numOffset);
     }
     value.free();


More information about the poppler mailing list