瀏覽代碼

PDF.js version 1.4.263 - See mozilla/pdf.js@d5c000850aeee9ce19b732d3c09d8d5fe596c98d

Pdf Bot 9 年之前
父節點
當前提交
7b09ccf074
共有 5 個文件被更改,包括 20 次插入20 次删除
  1. 1 1
      bower.json
  2. 8 8
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 8 8
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

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

+ 8 - 8
build/pdf.combined.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.4.260';
-var pdfjsBuild = '2001953';
+var pdfjsVersion = '1.4.263';
+var pdfjsBuild = 'd5c0008';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
@@ -43425,6 +43425,12 @@ var XRef = (function XRefClosure() {
             error('Invalid entry in XRef subsection: ' + first + ', ' + count);
           }
 
+          // The first xref table entry, i.e. obj 0, should be free. Attempting
+          // to adjust an incorrect first obj # (fixes issue 3248 and 7229).
+          if (i === 0 && entry.free && first === 1) {
+            first = 0;
+          }
+
           if (!this.entries[i + first]) {
             this.entries[i + first] = entry;
           }
@@ -43438,12 +43444,6 @@ var XRef = (function XRefClosure() {
         delete tableState.entryCount;
       }
 
-      // Per issue 3248: hp scanners generate bad XRef
-      if (first === 1 && this.entries[1] && this.entries[1].free) {
-        // shifting the entries
-        this.entries.shift();
-      }
-
       // Sanity check: as per spec, first object must be free
       if (this.entries[0] && !this.entries[0].free) {
         error('Invalid XRef table: unexpected first object');

+ 2 - 2
build/pdf.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.4.260';
-var pdfjsBuild = '2001953';
+var pdfjsVersion = '1.4.263';
+var pdfjsBuild = 'd5c0008';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?

+ 8 - 8
build/pdf.worker.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.4.260';
-var pdfjsBuild = '2001953';
+var pdfjsVersion = '1.4.263';
+var pdfjsBuild = 'd5c0008';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
@@ -35079,6 +35079,12 @@ var XRef = (function XRefClosure() {
             error('Invalid entry in XRef subsection: ' + first + ', ' + count);
           }
 
+          // The first xref table entry, i.e. obj 0, should be free. Attempting
+          // to adjust an incorrect first obj # (fixes issue 3248 and 7229).
+          if (i === 0 && entry.free && first === 1) {
+            first = 0;
+          }
+
           if (!this.entries[i + first]) {
             this.entries[i + first] = entry;
           }
@@ -35092,12 +35098,6 @@ var XRef = (function XRefClosure() {
         delete tableState.entryCount;
       }
 
-      // Per issue 3248: hp scanners generate bad XRef
-      if (first === 1 && this.entries[1] && this.entries[1].free) {
-        // shifting the entries
-        this.entries.shift();
-      }
-
       // Sanity check: as per spec, first object must be free
       if (this.entries[0] && !this.entries[0].free) {
         error('Invalid XRef table: unexpected first object');

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.4.260",
+  "version": "1.4.263",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [