summaryrefslogtreecommitdiff
path: root/poppler/PDFDoc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/PDFDoc.cc')
-rw-r--r--poppler/PDFDoc.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index f307890a..0d78588c 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1526,7 +1526,7 @@ void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint n
}
}
-Guint PDFDoc::writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset)
+Guint PDFDoc::writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset, GBool combine)
{
Guint objectsCount = 0; //count the number of objects in the XRef(s)
Guchar *fileKey;
@@ -1543,7 +1543,9 @@ Guint PDFDoc::writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset)
objectsCount++;
getXRef()->fetch(ref.num - numOffset, ref.gen, &obj);
Guint offset = writeObjectHeader(&ref, outStr);
- if (xRef->getEntry(n)->getFlag(XRefEntry::Unencrypted)) {
+ if (combine) {
+ writeObject(&obj, outStr, getXRef(), numOffset, NULL, cryptRC4, 0, 0, 0);
+ } else if (xRef->getEntry(n)->getFlag(XRefEntry::Unencrypted)) {
writeObject(&obj, outStr, NULL, cryptRC4, 0, 0, 0);
} else {
writeObject(&obj, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen);