浏览代码

PDF.js version 1.1.171

Pdf Bot 10 年之前
父节点
当前提交
e00835ce64
共有 5 个文件被更改,包括 24 次插入12 次删除
  1. 1 1
      bower.json
  2. 10 4
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 10 4
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.1.169",
+  "version": "1.1.171",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 10 - 4
build/pdf.combined.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.169';
-PDFJS.build = 'c7756d5';
+PDFJS.version = '1.1.171';
+PDFJS.build = 'd105734';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -9262,6 +9262,10 @@ var PDFDocument = (function PDFDocumentClosure() {
   PDFDocument.prototype = {
     parse: function PDFDocument_parse(recoveryMode) {
       this.setup(recoveryMode);
+      var version = this.catalog.catDict.get('Version');
+      if (isName(version)) {
+        this.pdfFormatVersion = version.name;
+      }
       try {
         // checking if AcroForm is present
         this.acroForm = this.catalog.catDict.get('AcroForm');
@@ -9363,8 +9367,10 @@ var PDFDocument = (function PDFDocumentClosure() {
           }
           version += String.fromCharCode(ch);
         }
-        // removing "%PDF-"-prefix
-        this.pdfFormatVersion = version.substring(5);
+        if (!this.pdfFormatVersion) {
+          // removing "%PDF-"-prefix
+          this.pdfFormatVersion = version.substring(5);
+        }
         return;
       }
       // May not be a PDF file, continue anyway.

+ 2 - 2
build/pdf.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.169';
-PDFJS.build = 'c7756d5';
+PDFJS.version = '1.1.171';
+PDFJS.build = 'd105734';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it

+ 10 - 4
build/pdf.worker.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.169';
-PDFJS.build = 'c7756d5';
+PDFJS.version = '1.1.171';
+PDFJS.build = 'd105734';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -2909,6 +2909,10 @@ var PDFDocument = (function PDFDocumentClosure() {
   PDFDocument.prototype = {
     parse: function PDFDocument_parse(recoveryMode) {
       this.setup(recoveryMode);
+      var version = this.catalog.catDict.get('Version');
+      if (isName(version)) {
+        this.pdfFormatVersion = version.name;
+      }
       try {
         // checking if AcroForm is present
         this.acroForm = this.catalog.catDict.get('AcroForm');
@@ -3010,8 +3014,10 @@ var PDFDocument = (function PDFDocumentClosure() {
           }
           version += String.fromCharCode(ch);
         }
-        // removing "%PDF-"-prefix
-        this.pdfFormatVersion = version.substring(5);
+        if (!this.pdfFormatVersion) {
+          // removing "%PDF-"-prefix
+          this.pdfFormatVersion = version.substring(5);
+        }
         return;
       }
       // May not be a PDF file, continue anyway.

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.1.169",
+  "version": "1.1.171",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [
     "Mozilla",