Browse Source

PDF.js version 1.1.130

Pdf Bot 10 năm trước cách đây
mục cha
commit
b10e5849c3
5 tập tin đã thay đổi với 26 bổ sung10 xóa
  1. 1 1
      bower.json
  2. 11 3
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 11 3
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

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

+ 11 - 3
build/pdf.combined.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.128';
-PDFJS.build = 'd484ebd';
+PDFJS.version = '1.1.130';
+PDFJS.build = '67816bd';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -11714,7 +11714,15 @@ var LinkAnnotation = (function LinkAnnotationClosure() {
         if (!isValidUrl(url, false)) {
           url = '';
         }
-        data.url = url;
+        // According to ISO 32000-1:2008, section 12.6.4.7, 
+        // URI should to be encoded in 7-bit ASCII.
+        // Some bad PDFs may have URIs in UTF-8 encoding, see Bugzilla 1122280.
+        try {
+          data.url = stringToUTF8String(url);
+        } catch (e) {
+          // Fall back to a simple copy.
+          data.url = url;
+        }
       } else if (linkType === 'GoTo') {
         data.dest = action.get('D');
       } else if (linkType === 'GoToR') {

+ 2 - 2
build/pdf.js

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

+ 11 - 3
build/pdf.worker.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.1.128';
-PDFJS.build = 'd484ebd';
+PDFJS.version = '1.1.130';
+PDFJS.build = '67816bd';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -5361,7 +5361,15 @@ var LinkAnnotation = (function LinkAnnotationClosure() {
         if (!isValidUrl(url, false)) {
           url = '';
         }
-        data.url = url;
+        // According to ISO 32000-1:2008, section 12.6.4.7, 
+        // URI should to be encoded in 7-bit ASCII.
+        // Some bad PDFs may have URIs in UTF-8 encoding, see Bugzilla 1122280.
+        try {
+          data.url = stringToUTF8String(url);
+        } catch (e) {
+          // Fall back to a simple copy.
+          data.url = url;
+        }
       } else if (linkType === 'GoTo') {
         data.dest = action.get('D');
       } else if (linkType === 'GoToR') {

+ 1 - 1
package.json

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