summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorThomas Freitag <Thomas.Freitag@alfa.de>2014-05-07 21:54:46 +0200
committerAlbert Astals Cid <aacid@kde.org>2014-05-07 21:54:46 +0200
commit0a6c1ff777aa23c7a5654b313b639e66600883b9 (patch)
tree82bb9ab4883c4e44149c886fb4ef29341548660a /utils
parent5b2cdef49a8a0a92fd323fbe45841a5098a42ece (diff)
Only add annotations of the current page when splitting
Bug #77549
Diffstat (limited to 'utils')
-rw-r--r--utils/pdfunite.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
index 5f67c0ef..b53e4977 100644
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -4,7 +4,7 @@
//
// This file is licensed under the GPLv2 or later
//
-// Copyright (C) 2011-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2011-2014 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2012 Arseny Solokha <asolokha@gmx.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2012 Albert Astals Cid <aacid@kde.org>
@@ -12,6 +12,7 @@
// Copyright (C) 2013 Hib Eris <hib@hiberis.nl>
//
//========================================================================
+
#include <PDFDoc.h>
#include <GlobalParams.h>
#include "parseargs.h"
@@ -129,6 +130,12 @@ int main (int argc, char *argv[])
pages.push_back(page);
offsets.push_back(numOffset);
docs[i]->markPageObjects(pageDict, yRef, countRef, numOffset);
+ Object annotsObj;
+ pageDict->lookupNF("Annots", &annotsObj);
+ if (!annotsObj.isNull()) {
+ docs[i]->markAnnotations(&annotsObj, yRef, countRef, numOffset, refPage->num, refPage->num);
+ annotsObj.free();
+ }
}
objectsCount += docs[i]->writePageObjects(outStr, yRef, numOffset, gTrue);
numOffset = yRef->getNumObjects() + 1;