Yury Delendik 10 лет назад
Родитель
Сommit
8ce1d240ea
6 измененных файлов с 33 добавлено и 8 удалено
  1. 1 1
      bower.json
  2. 10 2
      build/pdf.combined.js
  3. 10 2
      build/pdf.js
  4. 2 2
      build/pdf.worker.js
  5. 1 1
      package.json
  6. 9 0
      web/compatibility.js

+ 1 - 1
bower.json

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

+ 10 - 2
build/pdf.combined.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.353';
-PDFJS.build = '480e093';
+PDFJS.version = '1.0.355';
+PDFJS.build = '2efbdfe';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -2481,6 +2481,14 @@ PDFJS.useOnlyCssZoom = (PDFJS.useOnlyCssZoom === undefined ?
 PDFJS.verbosity = (PDFJS.verbosity === undefined ?
                    PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
 
+/**
+ * The maximum supported canvas size in total pixels e.g. width * height. 
+ * The default value is 4096 * 4096. Use -1 for no limit.
+ * @var {number}
+ */
+PDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ?
+                         16777216 : PDFJS.maxCanvasPixels);
+
 /**
  * Document initialization / loading parameters object.
  *

+ 10 - 2
build/pdf.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.353';
-PDFJS.build = '480e093';
+PDFJS.version = '1.0.355';
+PDFJS.build = '2efbdfe';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -2481,6 +2481,14 @@ PDFJS.useOnlyCssZoom = (PDFJS.useOnlyCssZoom === undefined ?
 PDFJS.verbosity = (PDFJS.verbosity === undefined ?
                    PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
 
+/**
+ * The maximum supported canvas size in total pixels e.g. width * height. 
+ * The default value is 4096 * 4096. Use -1 for no limit.
+ * @var {number}
+ */
+PDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ?
+                         16777216 : PDFJS.maxCanvasPixels);
+
 /**
  * Document initialization / loading parameters object.
  *

+ 2 - 2
build/pdf.worker.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.353';
-PDFJS.build = '480e093';
+PDFJS.version = '1.0.355';
+PDFJS.build = '2efbdfe';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it

+ 1 - 1
package.json

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

+ 9 - 0
web/compatibility.js

@@ -507,3 +507,12 @@ if (typeof PDFJS === 'undefined') {
       window.setTimeout(callback, 20);
     });
 })();
+
+(function checkCanvasSizeLimitation() {
+  var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);
+  var isAndroid = /Android/g.test(navigator.userAgent);
+  if (isIOS || isAndroid) {
+    // 5MP
+    PDFJS.maxCanvasPixels = 5242880;
+  }
+})();