File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
pdfbox/src/test/java/org/apache/pdfbox/multipdf Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 6969import org .apache .pdfbox .text .PDFMarkedContentExtractor ;
7070
7171import static org .junit .jupiter .api .Assertions .assertEquals ;
72+ import static org .junit .jupiter .api .Assertions .assertFalse ;
7273import static org .junit .jupiter .api .Assertions .assertNotEquals ;
7374import static org .junit .jupiter .api .Assertions .assertNotNull ;
7475import static org .junit .jupiter .api .Assertions .assertNull ;
@@ -984,6 +985,12 @@ else if (kdict.containsKey(COSName.NUMS))
984985 checkElement (pageTree , kdict .getDictionaryObject (COSName .NUMS ), kdict );
985986 }
986987
988+ if (COSName .OBJR .equals (kdict .getDictionaryObject (COSName .TYPE )) ||
989+ COSName .MCR .equals (kdict .getDictionaryObject (COSName .TYPE )))
990+ {
991+ assertFalse (kdict .getCOSDictionary (COSName .PG ) == null && parentDict .getCOSDictionary (COSName .PG ) == null );
992+ }
993+
987994 // if we're an object reference dictionary (/OBJR), check the obj
988995 if (kdict .containsKey (COSName .OBJ ))
989996 {
@@ -1481,4 +1488,4 @@ void testPDFBox515() throws IOException
14811488 assertEquals (233 , bim .getHeight ());
14821489 }
14831490 }
1484- }
1491+ }
You can’t perform that action at this time.
0 commit comments