Making the test for extgstate be an 'eq' test and making the extgstate pdf

more robust for picking up errors.
This commit is contained in:
= 2011-10-13 14:50:47 -07:00
parent 029e91ebe4
commit 1c1633e87c
2 changed files with 24 additions and 11 deletions

2
pdf.js
View File

@ -4384,6 +4384,7 @@ var PartialEvaluator = (function partialEvaluator() {
while (!isEOF(obj = parser.getObj())) { while (!isEOF(obj = parser.getObj())) {
if (isCmd(obj)) { if (isCmd(obj)) {
debugger;
var cmd = obj.cmd; var cmd = obj.cmd;
var fn = OP_MAP[cmd]; var fn = OP_MAP[cmd];
if (!fn) { if (!fn) {
@ -5273,6 +5274,7 @@ var CanvasGraphics = (function canvasGraphics() {
this.current.leading = -leading; this.current.leading = -leading;
}, },
setFont: function canvasGraphicsSetFont(fontRef, size) { setFont: function canvasGraphicsSetFont(fontRef, size) {
debugger;
var font; var font;
// the tf command uses a name, but graphics state uses a reference // the tf command uses a name, but graphics state uses a reference
if (isName(fontRef)) { if (isName(fontRef)) {

View File

@ -36,8 +36,9 @@ endobj
/Length 8 0 R /Length 8 0 R
>> >>
stream stream
/F0 12 Tf
/F1 12 Tf
/GS1 gs /GS1 gs
/F0 12 Tf
BT BT
100 700 Td 100 700 Td
(I should be courier!) Tj (I should be courier!) Tj
@ -56,10 +57,11 @@ endobj
7 0 obj 7 0 obj
<< <<
/F0 10 0 R /F0 10 0 R
/F1 11 0 R
>> >>
endobj endobj
8 0 obj 8 0 obj
82 93
endobj endobj
9 0 obj 9 0 obj
<< <<
@ -81,25 +83,34 @@ endobj
/Encoding /WinAnsiEncoding /Encoding /WinAnsiEncoding
>> >>
endobj endobj
11 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /Times-Italic
/Encoding /WinAnsiEncoding
>>
endobj
xref xref
0 11 0 12
0000000000 65535 f 0000000000 65535 f
0000000015 00000 n 0000000015 00000 n
0000000078 00000 n 0000000078 00000 n
0000000135 00000 n 0000000135 00000 n
0000000239 00000 n 0000000239 00000 n
0000000304 00000 n 0000000304 00000 n
0000000441 00000 n 0000000452 00000 n
0000000473 00000 n 0000000484 00000 n
0000000505 00000 n 0000000527 00000 n
0000000523 00000 n 0000000545 00000 n
0000000653 00000 n 0000000675 00000 n
0000000771 00000 n
trailer trailer
<< <<
/Root 1 0 R /Root 1 0 R
/ID [<BFFF29B7D1C75EC69AC080682C2AFC5B> <BFFF29B7D1C75EC69AC080682C2AFC5B>] /ID [<FCE2529ACCE848A953BDB5D497D71C36> <FCE2529ACCE848A953BDB5D497D71C36>]
/Size 11 /Size 12
>> >>
startxref startxref
749 872
%%EOF %%EOF