mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Add different code-paths to {CMap, ToUnicodeMap}.charCodeOf
depending on length, since Array.prototype.indexOf
can be extremely inefficient for very large arrays (issue 8372)
Fixes 8372.
This commit is contained in:
parent
ac942ac657
commit
4ce5e520fb
5 changed files with 138 additions and 8 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -50,6 +50,7 @@
|
|||
!issue8061.pdf
|
||||
!issue8088.pdf
|
||||
!issue8125.pdf
|
||||
!issue8372.pdf
|
||||
!issue8424.pdf
|
||||
!bad-PageLabels.pdf
|
||||
!filled-background.pdf
|
||||
|
|
101
test/pdfs/issue8372.pdf
Normal file
101
test/pdfs/issue8372.pdf
Normal file
|
@ -0,0 +1,101 @@
|
|||
%PDF-1.7
|
||||
%âãÏÓ
|
||||
1 0 obj
|
||||
<<
|
||||
/BaseFont /AdobeHeitiStd-Regular
|
||||
/CIDSystemInfo 2 0 R
|
||||
/Subtype /CIDFontType2
|
||||
/FontDescriptor 3 0 R
|
||||
/Type /Font
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/FontName /AdobeHeitiStd-Regular
|
||||
/StemV 56
|
||||
/Ascent 967
|
||||
/Flags 32
|
||||
/Descent -283
|
||||
/ItalicAngle 0
|
||||
/FontBBox [-163 -283 1087 967]
|
||||
/Type /FontDescriptor
|
||||
/CapHeight 763
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/Supplement 4
|
||||
/Ordering (GB1)
|
||||
/Registry (Adobe)
|
||||
>>
|
||||
endobj
|
||||
4 0 obj
|
||||
<<
|
||||
/Pages 5 0 R
|
||||
/Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/MediaBox [0 0 200 50]
|
||||
/Kids [6 0 R]
|
||||
/Count 1
|
||||
/Type /Pages
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<<
|
||||
/Parent 5 0 R
|
||||
/MediaBox [0 0 200 50]
|
||||
/Resources
|
||||
<<
|
||||
/Font
|
||||
<<
|
||||
/F1 7 0 R
|
||||
>>
|
||||
>>
|
||||
/Contents 8 0 R
|
||||
/Type /Page
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<<
|
||||
/DescendantFonts [1 0 R]
|
||||
/BaseFont /AdobeHeitiStd-Regular
|
||||
/Subtype /Type0
|
||||
/Encoding /UniGB-UTF16-H
|
||||
/Type /Font
|
||||
>>
|
||||
endobj
|
||||
8 0 obj
|
||||
<<
|
||||
/Length 46
|
||||
>>
|
||||
stream
|
||||
BT
|
||||
10 20 TD
|
||||
/F1 20 Tf
|
||||
[(vî)0.389893(_U)]TJ
|
||||
ET
|
||||
|
||||
endstream
|
||||
endobj xref
|
||||
0 9
|
||||
0000000000 65535 f
|
||||
0000000015 00000 n
|
||||
0000000334 00000 n
|
||||
0000000149 00000 n
|
||||
0000000405 00000 n
|
||||
0000000456 00000 n
|
||||
0000000538 00000 n
|
||||
0000000667 00000 n
|
||||
0000000801 00000 n
|
||||
trailer
|
||||
|
||||
<<
|
||||
/Root 4 0 R
|
||||
/Size 9
|
||||
>>
|
||||
startxref
|
||||
899
|
||||
%%EOF
|
|
@ -2125,6 +2125,13 @@
|
|||
"link": false,
|
||||
"type": "text"
|
||||
},
|
||||
{ "id": "issue8372-text",
|
||||
"file": "pdfs/issue8372.pdf",
|
||||
"md5": "b02fb07364dd00ad5044bd259860da97",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "text"
|
||||
},
|
||||
{ "id": "bug894572",
|
||||
"file": "pdfs/bug894572.pdf",
|
||||
"md5": "e54a6b0451939f685ed37e3d46e16158",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue