From bd1b164cf95757798a76fe8fb7e15dbbcb363cc6 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Fri, 23 Oct 2015 16:13:29 +0100 Subject: [PATCH] PDF.js version 1.1.544 --- bower.json | 2 +- build/pdf.combined.js | 37 ++++++++++++++++++++++++++++++++----- build/pdf.js | 9 +++++++-- build/pdf.worker.js | 32 +++++++++++++++++++++++++++----- package.json | 2 +- 5 files changed, 68 insertions(+), 14 deletions(-) diff --git a/bower.json b/bower.json index 835af9e22..d2cd2c2f6 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.535", + "version": "1.1.544", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 2696084c4..6bfc5481f 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.535'; -PDFJS.build = 'eff28ee'; +PDFJS.version = '1.1.544'; +PDFJS.build = 'eabbfd7'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -5369,6 +5369,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { this.ctx.fillRect(0, 0, 1, 1); }, + paintXObject: function CanvasGraphics_paintXObject() { + UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown); + warn('Unsupported \'paintXObject\' command.'); + }, + // Marked content markPoint: function CanvasGraphics_markPoint(tag) { @@ -17536,9 +17541,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { operatorList) { // Create an IR of the pattern code. var tilingOpList = new OperatorList(); - return this.getOperatorList(pattern, - (patternDict.get('Resources') || resources), tilingOpList). - then(function () { + // Merge the available resources, to prevent issues when the patternDict + // is missing some /Resources entries (fixes issue6541.pdf). + var resourcesArray = [patternDict.get('Resources'), resources]; + var patternResources = Dict.merge(this.xref, resourcesArray); + + return this.getOperatorList(pattern, patternResources, tilingOpList).then( + function () { // Add the dependencies to the parent operator list so they are // resolved before sub operator list is executed synchronously. operatorList.addDependencies(tilingOpList.dependencies); @@ -18120,6 +18129,24 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { case OPS.rectangle: self.buildPath(operatorList, fn, args); continue; + case OPS.markPoint: + case OPS.markPointProps: + case OPS.beginMarkedContent: + case OPS.beginMarkedContentProps: + case OPS.endMarkedContent: + case OPS.beginCompat: + case OPS.endCompat: + // Ignore operators where the corresponding handlers are known to + // be no-op in CanvasGraphics (display/canvas.js). This prevents + // serialization errors and is also a bit more efficient. + // We could also try to serialize all objects in a general way, + // e.g. as done in https://github.com/mozilla/pdf.js/pull/6266, + // but doing so is meaningless without knowing the semantics. + continue; + default: + // Note: Let's hope that the ignored operator does not have any + // non-serializable arguments, otherwise postMessage will throw + // "An object could not be cloned.". } operatorList.addOp(fn, args); } diff --git a/build/pdf.js b/build/pdf.js index cc5dbbc22..602273883 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.535'; -PDFJS.build = 'eff28ee'; +PDFJS.version = '1.1.544'; +PDFJS.build = 'eabbfd7'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -5422,6 +5422,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { this.ctx.fillRect(0, 0, 1, 1); }, + paintXObject: function CanvasGraphics_paintXObject() { + UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown); + warn('Unsupported \'paintXObject\' command.'); + }, + // Marked content markPoint: function CanvasGraphics_markPoint(tag) { diff --git a/build/pdf.worker.js b/build/pdf.worker.js index b7cf84385..75f712e51 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.535'; -PDFJS.build = 'eff28ee'; +PDFJS.version = '1.1.544'; +PDFJS.build = 'eabbfd7'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -11080,9 +11080,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { operatorList) { // Create an IR of the pattern code. var tilingOpList = new OperatorList(); - return this.getOperatorList(pattern, - (patternDict.get('Resources') || resources), tilingOpList). - then(function () { + // Merge the available resources, to prevent issues when the patternDict + // is missing some /Resources entries (fixes issue6541.pdf). + var resourcesArray = [patternDict.get('Resources'), resources]; + var patternResources = Dict.merge(this.xref, resourcesArray); + + return this.getOperatorList(pattern, patternResources, tilingOpList).then( + function () { // Add the dependencies to the parent operator list so they are // resolved before sub operator list is executed synchronously. operatorList.addDependencies(tilingOpList.dependencies); @@ -11664,6 +11668,24 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { case OPS.rectangle: self.buildPath(operatorList, fn, args); continue; + case OPS.markPoint: + case OPS.markPointProps: + case OPS.beginMarkedContent: + case OPS.beginMarkedContentProps: + case OPS.endMarkedContent: + case OPS.beginCompat: + case OPS.endCompat: + // Ignore operators where the corresponding handlers are known to + // be no-op in CanvasGraphics (display/canvas.js). This prevents + // serialization errors and is also a bit more efficient. + // We could also try to serialize all objects in a general way, + // e.g. as done in https://github.com/mozilla/pdf.js/pull/6266, + // but doing so is meaningless without knowing the semantics. + continue; + default: + // Note: Let's hope that the ignored operator does not have any + // non-serializable arguments, otherwise postMessage will throw + // "An object could not be cloned.". } operatorList.addOp(fn, args); } diff --git a/package.json b/package.json index 0e19baf88..87463d89e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.535", + "version": "1.1.544", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",