[poppler] poppler/PDFDoc.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Thu Feb 4 01:16:01 CET 2016
poppler/PDFDoc.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit f1c4d8ac1fe4293566285117170e8234c1be3943
Author: Albert Astals Cid <aacid at kde.org>
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 <igorenbein at finjan.com>
// Copyright (C) 2010 Srinivas Adicherla <srinivas.adicherla at geodesic.com>
// Copyright (C) 2010 Philip Lorenz <lorenzph+freedesktop at gmail.com>
-// Copyright (C) 2011-2015 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2011-2016 Thomas Freitag <Thomas.Freitag at alfa.de>
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso at hotmail.it>
// Copyright (C) 2013, 2014 Adrian Johnson <ajohnson at redneon.com>
// Copyright (C) 2013 Adam Reichold <adamreichold at myopera.com>
@@ -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()) {
More information about the poppler
mailing list