Extracts evaluator preprocessor and refactor text extraction

This commit is contained in:
Yury Delendik 2014-01-17 07:16:52 -06:00
parent 455265474a
commit 09f8f951c8
4 changed files with 289 additions and 264 deletions

View file

@ -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();
},