Prevent errors when parsing Annotations with missing (or invalid) /Subtype entries (issue 7446)
Note that I used a separate warning message for this case, instead of utilizing the same one as in the unsupported subtype case, to more clearly indicate that the PDF file itself is to blame rather than PDF.js. Fixes 7446.
This commit is contained in:
parent
5678486802
commit
558a22cd02
5 changed files with 106 additions and 35 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -31,6 +31,7 @@
|
|||
!issue7403.pdf
|
||||
!issue7426.pdf
|
||||
!issue7439.pdf
|
||||
!issue7446.pdf
|
||||
!issue7492.pdf
|
||||
!filled-background.pdf
|
||||
!ArabicCIDTrueType.pdf
|
||||
|
|
51
test/pdfs/issue7446.pdf
Normal file
51
test/pdfs/issue7446.pdf
Normal file
|
@ -0,0 +1,51 @@
|
|||
%PDF-1.7
|
||||
%%μῦ
|
||||
|
||||
1 0 obj
|
||||
<</Type/Catalog/Pages 2 0 R>>
|
||||
endobj
|
||||
|
||||
2 0 obj
|
||||
<</Type/Pages/MediaBox[0 0 200 200]/Count 1/Kids[3 0 R]>>
|
||||
endobj
|
||||
|
||||
3 0 obj
|
||||
<</Type/Page/Parent 2 0 R/Annots[6 0 R]/Resources<</Font<</F1 4 0 R>>>>/Contents 5 0 R>>
|
||||
endobj
|
||||
|
||||
4 0 obj
|
||||
<</Type/Font/Subtype/Type1/BaseFont/Times-Roman>>
|
||||
endobj
|
||||
|
||||
5 0 obj
|
||||
<</Length 68>>
|
||||
stream
|
||||
BT
|
||||
10 10 TD
|
||||
/F1 12 Tf
|
||||
(Renders even with a broken annotation) Tj
|
||||
ET
|
||||
|
||||
endstream
|
||||
endobj
|
||||
|
||||
6 0 obj
|
||||
<</Type/Annot/Rect[266 116 430 204]/Contents( This annotation is broken )>>
|
||||
endobj
|
||||
|
||||
xref
|
||||
0 7
|
||||
0000000000 65536 f
|
||||
0000000018 00000 n
|
||||
0000000064 00000 n
|
||||
0000000138 00000 n
|
||||
0000000243 00000 n
|
||||
0000000309 00000 n
|
||||
0000000426 00000 n
|
||||
|
||||
trailer
|
||||
<</Size 7/Root 1 0 R>>
|
||||
|
||||
startxref
|
||||
518
|
||||
%%EOF
|
Loading…
Add table
Add a link
Reference in a new issue