Blame SOURCES/poppler-0.26.5-pdfunite-missing-pages.patch
|
|
76f8c5 |
--- poppler-0.26.5/utils/pdfunite.cc.the 2014-07-25 00:28:01.000000000 +0200
|
|
|
76f8c5 |
+++ poppler-0.26.5/utils/pdfunite.cc 2019-02-20 11:37:39.405536641 +0100
|
|
|
76f8c5 |
@@ -80,6 +80,12 @@ int main (int argc, char *argv[])
|
|
|
76f8c5 |
GooString *gfileName = new GooString(argv[i]);
|
|
|
76f8c5 |
PDFDoc *doc = new PDFDoc(gfileName, NULL, NULL, NULL);
|
|
|
76f8c5 |
if (doc->isOk() && !doc->isEncrypted()) {
|
|
|
76f8c5 |
+ for (j = 1; j <= doc->getNumPages(); j++) {
|
|
|
76f8c5 |
+ if (doc->getCatalog()->getPage(j) == NULL) {
|
|
|
76f8c5 |
+ error(errSyntaxError, -1, "Page number {0:d} is missing in '{1:s}')", j, argv[i]);
|
|
|
76f8c5 |
+ return -1;
|
|
|
76f8c5 |
+ }
|
|
|
76f8c5 |
+ }
|
|
|
76f8c5 |
docs.push_back(doc);
|
|
|
76f8c5 |
if (doc->getPDFMajorVersion() > majorVersion) {
|
|
|
76f8c5 |
majorVersion = doc->getPDFMajorVersion();
|