Skip to content

Commit a23e53a

Browse files
committed
Ignore Form as well as Image XObjects when assembling the text array for a PDFObject.
1 parent 370b7e9 commit a23e53a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Smalot/PdfParser/PDFObject.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,9 @@ public function getTextArray(?Page $page = null): array
788788
break;
789789
}
790790

791-
// If the PDFObject is an image, do nothing, as images aren't text.
792-
if ($xobject instanceof Image) {
791+
// If the PDFObject is an Image or a Form, do nothing as
792+
// neither of these XObject types are text.
793+
if ($xobject instanceof Image || $xobject instanceof Form) {
793794
break;
794795
}
795796

0 commit comments

Comments
 (0)