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

New commits:
commit f1c4d8ac1fe4293566285117170e8234c1be3943
Author: Albert Astals Cid <[email protected]>
Date:   Thu Feb 4 01:08:59 2016 +0100

    pdfseparate: Refine resource detection
    
    Related to bug #87637

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 46c4544..8287060 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -26,7 +26,7 @@
 // Copyright (C) 2010 Ilya Gorenbein <[email protected]>
 // Copyright (C) 2010 Srinivas Adicherla <[email protected]>
 // Copyright (C) 2010 Philip Lorenz <[email protected]>
-// Copyright (C) 2011-2015 Thomas Freitag <[email protected]>
+// Copyright (C) 2011-2016 Thomas Freitag <[email protected]>
 // Copyright (C) 2012, 2013 Fabio D'Urso <[email protected]>
 // Copyright (C) 2013, 2014 Adrian Johnson <[email protected]>
 // Copyright (C) 2013 Adam Reichold <[email protected]>
@@ -701,6 +701,13 @@ int PDFDoc::savePageAs(GooString *name, int pageNo)
   markPageObjects(catDict, yRef, countRef, 0, refPage->num, rootNum + 2);
 
   Dict *pageDict = page.getDict();
+  if (resourcesObj.isNull() && !pageDict->hasKey("Resources")) {
+    Dict *resourceDict = getCatalog()->getPage(pageNo)->getResourceDict();
+    if (resourceDict != NULL) {
+      resourcesObj.initDict(resourceDict);
+      markPageObjects(resourcesObj.getDict(), yRef, countRef, 0, refPage->num, 
rootNum + 2);
+    }
+  }
   markPageObjects(pageDict, yRef, countRef, 0, refPage->num, rootNum + 2);
   pageDict->lookupNF("Annots", &annotsObj);
   if (!annotsObj.isNull()) {
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to