|
|
@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); |
|
|
|
// Use strict in our context only - users might not want it
|
|
|
|
// Use strict in our context only - users might not want it
|
|
|
|
'use strict'; |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
|
|
var pdfjsVersion = '1.4.168'; |
|
|
|
var pdfjsVersion = '1.4.170'; |
|
|
|
var pdfjsBuild = 'df0cbcc'; |
|
|
|
var pdfjsBuild = '4e2f704'; |
|
|
|
|
|
|
|
|
|
|
|
var pdfjsFilePath = |
|
|
|
var pdfjsFilePath = |
|
|
|
typeof document !== 'undefined' && document.currentScript ? |
|
|
|
typeof document !== 'undefined' && document.currentScript ? |
|
|
@ -39966,11 +39966,20 @@ var WorkerTransport = (function WorkerTransportClosure() { |
|
|
|
|
|
|
|
|
|
|
|
var page = this.pageCache[data.pageNum - 1]; |
|
|
|
var page = this.pageCache[data.pageNum - 1]; |
|
|
|
var intentState = page.intentStates[data.intent]; |
|
|
|
var intentState = page.intentStates[data.intent]; |
|
|
|
|
|
|
|
|
|
|
|
if (intentState.displayReadyCapability) { |
|
|
|
if (intentState.displayReadyCapability) { |
|
|
|
intentState.displayReadyCapability.reject(data.error); |
|
|
|
intentState.displayReadyCapability.reject(data.error); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
error(data.error); |
|
|
|
error(data.error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (intentState.operatorList) { |
|
|
|
|
|
|
|
// Mark operator list as complete.
|
|
|
|
|
|
|
|
intentState.operatorList.lastChunk = true; |
|
|
|
|
|
|
|
for (var i = 0; i < intentState.renderTasks.length; i++) { |
|
|
|
|
|
|
|
intentState.renderTasks[i].operatorListChanged(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, this); |
|
|
|
}, this); |
|
|
|
|
|
|
|
|
|
|
|
messageHandler.on('UnsupportedFeature', |
|
|
|
messageHandler.on('UnsupportedFeature', |
|
|
@ -45538,7 +45547,16 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); |
|
|
|
var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); |
|
|
|
var timeSlotManager = new TimeSlotManager(); |
|
|
|
var timeSlotManager = new TimeSlotManager(); |
|
|
|
|
|
|
|
|
|
|
|
return new Promise(function next(resolve, reject) { |
|
|
|
return new Promise(function promiseBody(resolve, reject) { |
|
|
|
|
|
|
|
var next = function (promise) { |
|
|
|
|
|
|
|
promise.then(function () { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
promiseBody(resolve, reject); |
|
|
|
|
|
|
|
} catch (ex) { |
|
|
|
|
|
|
|
reject(ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, reject); |
|
|
|
|
|
|
|
}; |
|
|
|
task.ensureNotTerminated(); |
|
|
|
task.ensureNotTerminated(); |
|
|
|
timeSlotManager.reset(); |
|
|
|
timeSlotManager.reset(); |
|
|
|
var stop, operation = {}, i, ii, cs; |
|
|
|
var stop, operation = {}, i, ii, cs; |
|
|
@ -45581,13 +45599,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
|
|
|
|
|
|
|
|
if (type.name === 'Form') { |
|
|
|
if (type.name === 'Form') { |
|
|
|
stateManager.save(); |
|
|
|
stateManager.save(); |
|
|
|
return self.buildFormXObject(resources, xobj, null, |
|
|
|
next(self.buildFormXObject(resources, xobj, null, |
|
|
|
operatorList, task, |
|
|
|
operatorList, task, |
|
|
|
stateManager.state.clone()). |
|
|
|
stateManager.state.clone()). |
|
|
|
then(function () { |
|
|
|
then(function () { |
|
|
|
stateManager.restore(); |
|
|
|
stateManager.restore(); |
|
|
|
next(resolve, reject); |
|
|
|
})); |
|
|
|
}, reject); |
|
|
|
return; |
|
|
|
} else if (type.name === 'Image') { |
|
|
|
} else if (type.name === 'Image') { |
|
|
|
self.buildPaintImageXObject(resources, xobj, false, |
|
|
|
self.buildPaintImageXObject(resources, xobj, false, |
|
|
|
operatorList, name, imageCache); |
|
|
|
operatorList, name, imageCache); |
|
|
@ -45606,13 +45624,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
case OPS.setFont: |
|
|
|
case OPS.setFont: |
|
|
|
var fontSize = args[1]; |
|
|
|
var fontSize = args[1]; |
|
|
|
// eagerly collect all fonts
|
|
|
|
// eagerly collect all fonts
|
|
|
|
return self.handleSetFont(resources, args, null, operatorList, |
|
|
|
next(self.handleSetFont(resources, args, null, operatorList, |
|
|
|
task, stateManager.state). |
|
|
|
task, stateManager.state). |
|
|
|
then(function (loadedName) { |
|
|
|
then(function (loadedName) { |
|
|
|
operatorList.addDependency(loadedName); |
|
|
|
operatorList.addDependency(loadedName); |
|
|
|
operatorList.addOp(OPS.setFont, [loadedName, fontSize]); |
|
|
|
operatorList.addOp(OPS.setFont, [loadedName, fontSize]); |
|
|
|
next(resolve, reject); |
|
|
|
})); |
|
|
|
}, reject); |
|
|
|
return; |
|
|
|
case OPS.endInlineImage: |
|
|
|
case OPS.endInlineImage: |
|
|
|
var cacheKey = args[0].cacheKey; |
|
|
|
var cacheKey = args[0].cacheKey; |
|
|
|
if (cacheKey) { |
|
|
|
if (cacheKey) { |
|
|
@ -45712,10 +45730,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
case OPS.setFillColorN: |
|
|
|
case OPS.setFillColorN: |
|
|
|
cs = stateManager.state.fillColorSpace; |
|
|
|
cs = stateManager.state.fillColorSpace; |
|
|
|
if (cs.name === 'Pattern') { |
|
|
|
if (cs.name === 'Pattern') { |
|
|
|
return self.handleColorN(operatorList, OPS.setFillColorN, |
|
|
|
next(self.handleColorN(operatorList, OPS.setFillColorN, args, |
|
|
|
args, cs, patterns, resources, task, xref).then(function() { |
|
|
|
cs, patterns, resources, task, xref)); |
|
|
|
next(resolve, reject); |
|
|
|
return; |
|
|
|
}, reject); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
args = cs.getRgb(args, 0); |
|
|
|
args = cs.getRgb(args, 0); |
|
|
|
fn = OPS.setFillRGBColor; |
|
|
|
fn = OPS.setFillRGBColor; |
|
|
@ -45723,10 +45740,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
case OPS.setStrokeColorN: |
|
|
|
case OPS.setStrokeColorN: |
|
|
|
cs = stateManager.state.strokeColorSpace; |
|
|
|
cs = stateManager.state.strokeColorSpace; |
|
|
|
if (cs.name === 'Pattern') { |
|
|
|
if (cs.name === 'Pattern') { |
|
|
|
return self.handleColorN(operatorList, OPS.setStrokeColorN, |
|
|
|
next(self.handleColorN(operatorList, OPS.setStrokeColorN, args, |
|
|
|
args, cs, patterns, resources, task, xref).then(function() { |
|
|
|
cs, patterns, resources, task, xref)); |
|
|
|
next(resolve, reject); |
|
|
|
return; |
|
|
|
}, reject); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
args = cs.getRgb(args, 0); |
|
|
|
args = cs.getRgb(args, 0); |
|
|
|
fn = OPS.setStrokeRGBColor; |
|
|
|
fn = OPS.setStrokeRGBColor; |
|
|
@ -45758,10 +45774,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var gState = extGState.get(dictName.name); |
|
|
|
var gState = extGState.get(dictName.name); |
|
|
|
return self.setGState(resources, gState, operatorList, task, |
|
|
|
next(self.setGState(resources, gState, operatorList, task, xref, |
|
|
|
xref, stateManager).then(function() { |
|
|
|
stateManager)); |
|
|
|
next(resolve, reject); |
|
|
|
return; |
|
|
|
}, reject); |
|
|
|
|
|
|
|
case OPS.moveTo: |
|
|
|
case OPS.moveTo: |
|
|
|
case OPS.lineTo: |
|
|
|
case OPS.lineTo: |
|
|
|
case OPS.curveTo: |
|
|
|
case OPS.curveTo: |
|
|
@ -45806,9 +45821,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
operatorList.addOp(fn, args); |
|
|
|
operatorList.addOp(fn, args); |
|
|
|
} |
|
|
|
} |
|
|
|
if (stop) { |
|
|
|
if (stop) { |
|
|
|
deferred.then(function () { |
|
|
|
next(deferred); |
|
|
|
next(resolve, reject); |
|
|
|
|
|
|
|
}, reject); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// Some PDFs don't close all restores inside object/form.
|
|
|
|
// Some PDFs don't close all restores inside object/form.
|
|
|
@ -46084,7 +46097,16 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
|
|
|
|
|
|
|
|
var timeSlotManager = new TimeSlotManager(); |
|
|
|
var timeSlotManager = new TimeSlotManager(); |
|
|
|
|
|
|
|
|
|
|
|
return new Promise(function next(resolve, reject) { |
|
|
|
return new Promise(function promiseBody(resolve, reject) { |
|
|
|
|
|
|
|
var next = function (promise) { |
|
|
|
|
|
|
|
promise.then(function () { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
promiseBody(resolve, reject); |
|
|
|
|
|
|
|
} catch (ex) { |
|
|
|
|
|
|
|
reject(ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, reject); |
|
|
|
|
|
|
|
}; |
|
|
|
task.ensureNotTerminated(); |
|
|
|
task.ensureNotTerminated(); |
|
|
|
timeSlotManager.reset(); |
|
|
|
timeSlotManager.reset(); |
|
|
|
var stop, operation = {}, args = []; |
|
|
|
var stop, operation = {}, args = []; |
|
|
@ -46106,9 +46128,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
case OPS.setFont: |
|
|
|
case OPS.setFont: |
|
|
|
flushTextContentItem(); |
|
|
|
flushTextContentItem(); |
|
|
|
textState.fontSize = args[1]; |
|
|
|
textState.fontSize = args[1]; |
|
|
|
return handleSetFont(args[0].name).then(function() { |
|
|
|
next(handleSetFont(args[0].name)); |
|
|
|
next(resolve, reject); |
|
|
|
return; |
|
|
|
}, reject); |
|
|
|
|
|
|
|
case OPS.setTextRise: |
|
|
|
case OPS.setTextRise: |
|
|
|
flushTextContentItem(); |
|
|
|
flushTextContentItem(); |
|
|
|
textState.textRise = args[0]; |
|
|
|
textState.textRise = args[0]; |
|
|
@ -46279,7 +46300,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
stateManager.transform(matrix); |
|
|
|
stateManager.transform(matrix); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return self.getTextContent(xobj, task, |
|
|
|
next(self.getTextContent(xobj, task, |
|
|
|
xobj.dict.get('Resources') || resources, stateManager, |
|
|
|
xobj.dict.get('Resources') || resources, stateManager, |
|
|
|
normalizeWhitespace).then(function (formTextContent) { |
|
|
|
normalizeWhitespace).then(function (formTextContent) { |
|
|
|
Util.appendToArray(textContent.items, formTextContent.items); |
|
|
|
Util.appendToArray(textContent.items, formTextContent.items); |
|
|
@ -46288,9 +46309,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
|
|
|
|
|
|
|
|
xobjsCache.key = name; |
|
|
|
xobjsCache.key = name; |
|
|
|
xobjsCache.texts = formTextContent; |
|
|
|
xobjsCache.texts = formTextContent; |
|
|
|
|
|
|
|
})); |
|
|
|
next(resolve, reject); |
|
|
|
return; |
|
|
|
}, reject); |
|
|
|
|
|
|
|
case OPS.setGState: |
|
|
|
case OPS.setGState: |
|
|
|
flushTextContentItem(); |
|
|
|
flushTextContentItem(); |
|
|
|
var dictName = args[0]; |
|
|
|
var dictName = args[0]; |
|
|
@ -46310,17 +46330,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
if (gsStateFont) { |
|
|
|
if (gsStateFont) { |
|
|
|
textState.fontSize = gsStateFont[1]; |
|
|
|
textState.fontSize = gsStateFont[1]; |
|
|
|
return handleSetFont(gsStateFont[0]).then(function() { |
|
|
|
next(handleSetFont(gsStateFont[0])); |
|
|
|
next(resolve, reject); |
|
|
|
return; |
|
|
|
}, reject); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} // switch
|
|
|
|
} // switch
|
|
|
|
} // while
|
|
|
|
} // while
|
|
|
|
if (stop) { |
|
|
|
if (stop) { |
|
|
|
deferred.then(function () { |
|
|
|
next(deferred); |
|
|
|
next(resolve, reject); |
|
|
|
|
|
|
|
}, reject); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
flushTextContentItem(); |
|
|
|
flushTextContentItem(); |
|
|
|