Browse Source
After PR 6590, `font.spaceWidth` is now called in more cases than before (in `PartialEvaluator_getTextContent`), which exposed an underlying issue with `IdentityToUnicodeMap_charCodeOf` throwing an error. This breaks text-selection in some PDF files found in the wild, hence this patch replaces the `error` with an actual function instead (modelled after `IdentityCMap_charCodeOf`).
4 changed files with 79 additions and 3 deletions
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
%PDF-1.7 |
||||
%âãÏÓ |
||||
1 0 obj |
||||
<< |
||||
/Pages 2 0 R |
||||
/Type /Catalog |
||||
>> |
||||
endobj |
||||
2 0 obj |
||||
<< |
||||
/Kids [3 0 R] |
||||
/Count 1 |
||||
/Type /Pages |
||||
>> |
||||
endobj |
||||
3 0 obj |
||||
<< |
||||
/Parent 2 0 R |
||||
/MediaBox [0 0 200 50] |
||||
/Resources |
||||
<< |
||||
/Font |
||||
<< |
||||
/F1 4 0 R |
||||
>> |
||||
>> |
||||
/Contents 5 0 R |
||||
/Type /Page |
||||
>> |
||||
endobj |
||||
4 0 obj |
||||
<< |
||||
/BaseFont /Times-Roman |
||||
/Subtype /Type1 |
||||
/ToUnicode /Identity-H |
||||
/Encoding /WinAnsiEncoding |
||||
/Type /Font |
||||
>> |
||||
endobj |
||||
5 0 obj |
||||
<< |
||||
/Length 37 |
||||
>> |
||||
stream |
||||
BT |
||||
10 20 TD |
||||
/F1 20 Tf |
||||
(ABCdef) Tj |
||||
ET |
||||
|
||||
endstream |
||||
endobj xref |
||||
0 6 |
||||
0000000000 65535 f |
||||
0000000015 00000 n |
||||
0000000066 00000 n |
||||
0000000125 00000 n |
||||
0000000254 00000 n |
||||
0000000378 00000 n |
||||
trailer |
||||
|
||||
<< |
||||
/Root 1 0 R |
||||
/Size 6 |
||||
>> |
||||
startxref |
||||
467 |
||||
%%EOF |
Loading…
Reference in new issue