فهرست منبع

PDF.js version 1.0.217

Yury Delendik 10 سال پیش
والد
کامیت
bcd5170389
5فایلهای تغییر یافته به همراه32 افزوده شده و 8 حذف شده
  1. 1 1
      bower.json
  2. 14 2
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 14 2
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.0.215",
+  "version": "1.0.217",
   "keywords": [
     "Mozilla",
     "pdf",

+ 14 - 2
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) {

+ 2 - 2
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

+ 14 - 2
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) {

+ 1 - 1
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",