diff --git a/pdf.js b/pdf.js index c76ae7da0..4f5bf08a1 100644 --- a/pdf.js +++ b/pdf.js @@ -4384,6 +4384,7 @@ var PartialEvaluator = (function partialEvaluator() { while (!isEOF(obj = parser.getObj())) { if (isCmd(obj)) { + debugger; var cmd = obj.cmd; var fn = OP_MAP[cmd]; if (!fn) { @@ -5273,6 +5274,7 @@ var CanvasGraphics = (function canvasGraphics() { this.current.leading = -leading; }, setFont: function canvasGraphicsSetFont(fontRef, size) { + debugger; var font; // the tf command uses a name, but graphics state uses a reference if (isName(fontRef)) { diff --git a/test/pdfs/extgstate.pdf b/test/pdfs/extgstate.pdf index 711c45147..3392d9a66 100644 --- a/test/pdfs/extgstate.pdf +++ b/test/pdfs/extgstate.pdf @@ -36,8 +36,9 @@ endobj /Length 8 0 R >> stream + /F0 12 Tf +/F1 12 Tf /GS1 gs -/F0 12 Tf BT 100 700 Td (I should be courier!) Tj @@ -56,10 +57,11 @@ endobj 7 0 obj << /F0 10 0 R +/F1 11 0 R >> endobj 8 0 obj -82 +93 endobj 9 0 obj << @@ -81,25 +83,34 @@ endobj /Encoding /WinAnsiEncoding >> endobj +11 0 obj +<< +/Type /Font +/Subtype /Type1 +/BaseFont /Times-Italic +/Encoding /WinAnsiEncoding +>> +endobj xref -0 11 +0 12 0000000000 65535 f 0000000015 00000 n 0000000078 00000 n 0000000135 00000 n 0000000239 00000 n 0000000304 00000 n -0000000441 00000 n -0000000473 00000 n -0000000505 00000 n -0000000523 00000 n -0000000653 00000 n +0000000452 00000 n +0000000484 00000 n +0000000527 00000 n +0000000545 00000 n +0000000675 00000 n +0000000771 00000 n trailer << /Root 1 0 R -/ID [ ] -/Size 11 +/ID [ ] +/Size 12 >> startxref -749 +872 %%EOF