diff --git a/bower.json b/bower.json index cd67c82af..88a915f60 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.215", + "version": "1.0.217", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index d0c9b4a86..0cdedeb8d 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.215'; -PDFJS.build = '6d33025'; +PDFJS.version = '1.0.217'; +PDFJS.build = '37a6aac'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -21900,6 +21900,7 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { // dictionary this.parser = new Parser(new Lexer(stream, OP_MAP), false, xref); this.stateManager = stateManager; + this.nonProcessedArgs = []; } EvaluatorPreprocessor.prototype = { @@ -21933,6 +21934,17 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { var fn = opSpec.id; + // Some post script commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf + if (!opSpec.variableArgs && args.length !== opSpec.numArgs) { + while (args.length > opSpec.numArgs) { + this.nonProcessedArgs.push(args.shift()); + } + + while (args.length < opSpec.numArgs && this.nonProcessedArgs.length) { + args.unshift(this.nonProcessedArgs.pop()); + } + } + // Validate the number of arguments for the command if (opSpec.variableArgs) { if (args.length > opSpec.numArgs) { diff --git a/build/pdf.js b/build/pdf.js index 0be053df1..e64ae5371 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.215'; -PDFJS.build = '6d33025'; +PDFJS.version = '1.0.217'; +PDFJS.build = '37a6aac'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index cc65d1b18..848407008 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.215'; -PDFJS.build = '6d33025'; +PDFJS.version = '1.0.217'; +PDFJS.build = '37a6aac'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -17307,6 +17307,7 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { // dictionary this.parser = new Parser(new Lexer(stream, OP_MAP), false, xref); this.stateManager = stateManager; + this.nonProcessedArgs = []; } EvaluatorPreprocessor.prototype = { @@ -17340,6 +17341,17 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { var fn = opSpec.id; + // Some post script commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf + if (!opSpec.variableArgs && args.length !== opSpec.numArgs) { + while (args.length > opSpec.numArgs) { + this.nonProcessedArgs.push(args.shift()); + } + + while (args.length < opSpec.numArgs && this.nonProcessedArgs.length) { + args.unshift(this.nonProcessedArgs.pop()); + } + } + // Validate the number of arguments for the command if (opSpec.variableArgs) { if (args.length > opSpec.numArgs) { diff --git a/package.json b/package.json index 82a34fbeb..283b1d329 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.215", + "version": "1.0.217", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",