pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1851291 - /pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
Date Mon, 14 Jan 2019 20:01:25 GMT
Author: tilman
Date: Mon Jan 14 20:01:24 2019
New Revision: 1851291

URL: http://svn.apache.org/viewvc?rev=1851291&view=rev
Log:
PDFBOX-4408: check /StructParent for all annotations, not just widgets

Modified:
    pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java

Modified: pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java?rev=1851291&r1=1851290&r2=1851291&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
Mon Jan 14 20:01:24 2019
@@ -642,6 +642,14 @@ public class PDFMergerUtilityTest extend
             {
                 assertTrue(keySet.contains(page.getStructParents()));
             }
+            for (PDAnnotation ann : page.getAnnotations())
+            {
+                if (ann.getStructParent() >= 0)
+                {
+                    assertTrue("/StructParent " + ann.getStructParent() + " missing in /ParentTree",
+                               keySet.contains(ann.getStructParent()));
+                }
+            }
         }
 
         // might also test image and form dictionaries...



Mime
View raw message