mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Extracts evaluator preprocessor and refactor text extraction
This commit is contained in:
parent
455265474a
commit
09f8f951c8
4 changed files with 289 additions and 264 deletions
|
@ -376,7 +376,6 @@ var CanvasExtraState = (function CanvasExtraStateClosure() {
|
|||
this.fillAlpha = 1;
|
||||
this.strokeAlpha = 1;
|
||||
this.lineWidth = 1;
|
||||
this.paintFormXObjectDepth = 0;
|
||||
|
||||
this.old = old;
|
||||
}
|
||||
|
@ -1453,7 +1452,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix,
|
||||
bbox) {
|
||||
this.save();
|
||||
this.current.paintFormXObjectDepth++;
|
||||
this.baseTransformStack.push(this.baseTransform);
|
||||
|
||||
if (matrix && isArray(matrix) && 6 == matrix.length)
|
||||
|
@ -1471,12 +1469,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
},
|
||||
|
||||
paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() {
|
||||
var depth = this.current.paintFormXObjectDepth;
|
||||
do {
|
||||
this.restore();
|
||||
// some pdf don't close all restores inside object
|
||||
// closing those for them
|
||||
} while (this.current.paintFormXObjectDepth >= depth);
|
||||
this.restore();
|
||||
this.baseTransform = this.baseTransformStack.pop();
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue