Browse Source

PDF.js version 1.7.258 - See mozilla/pdf.js@9b0e0954fbda8e9514e222c9398cbdbc98b5da6e

master v1.7.258
pdfjsbot 8 years ago
parent
commit
642d5e2485
  1. 2
      bower.json
  2. 46
      build/pdf.combined.js
  3. 46
      build/pdf.js
  4. 10
      build/pdf.min.js
  5. 4
      build/pdf.worker.js
  6. 2
      package.json

2
bower.json

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

46
build/pdf.combined.js

@ -23,8 +23,8 @@
} }
}(this, function (exports) { }(this, function (exports) {
'use strict'; 'use strict';
var pdfjsVersion = '1.7.256'; var pdfjsVersion = '1.7.258';
var pdfjsBuild = 'd3ae5b38'; var pdfjsBuild = '9b0e0954';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -23192,20 +23192,26 @@
create: function DOMCanvasFactory_create(width, height) { create: function DOMCanvasFactory_create(width, height) {
assert(width > 0 && height > 0, 'invalid canvas size'); assert(width > 0 && height > 0, 'invalid canvas size');
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
canvas.width = width; canvas.width = width;
canvas.height = height; canvas.height = height;
return canvas; return {
canvas: canvas,
context: context
};
}, },
reset: function DOMCanvasFactory_reset(canvas, width, height) { reset: function DOMCanvasFactory_reset(canvasAndContextPair, width, height) {
assert(canvas, 'canvas is not specified'); assert(canvasAndContextPair.canvas, 'canvas is not specified');
assert(width > 0 && height > 0, 'invalid canvas size'); assert(width > 0 && height > 0, 'invalid canvas size');
canvas.width = width; canvasAndContextPair.canvas.width = width;
canvas.height = height; canvasAndContextPair.canvas.height = height;
}, },
destroy: function DOMCanvasFactory_destroy(canvas) { destroy: function DOMCanvasFactory_destroy(canvasAndContextPair) {
assert(canvas, 'canvas is not specified'); assert(canvasAndContextPair.canvas, 'canvas is not specified');
canvas.width = 0; canvasAndContextPair.canvas.width = 0;
canvas.height = 0; canvasAndContextPair.canvas.height = 0;
canvasAndContextPair.canvas = null;
canvasAndContextPair.context = null;
} }
}; };
var CustomStyle = function CustomStyleClosure() { var CustomStyle = function CustomStyleClosure() {
@ -45574,25 +45580,21 @@
var canvasEntry; var canvasEntry;
if (this.cache[id] !== undefined) { if (this.cache[id] !== undefined) {
canvasEntry = this.cache[id]; canvasEntry = this.cache[id];
this.canvasFactory.reset(canvasEntry.canvas, width, height); this.canvasFactory.reset(canvasEntry, width, height);
canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0); canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);
} else { } else {
var canvas = this.canvasFactory.create(width, height); canvasEntry = this.canvasFactory.create(width, height);
var ctx = canvas.getContext('2d'); this.cache[id] = canvasEntry;
if (trackTransform) {
addContextCurrentTransform(ctx);
} }
this.cache[id] = canvasEntry = { if (trackTransform) {
canvas: canvas, addContextCurrentTransform(canvasEntry.context);
context: ctx
};
} }
return canvasEntry; return canvasEntry;
}, },
clear: function () { clear: function () {
for (var id in this.cache) { for (var id in this.cache) {
var canvasEntry = this.cache[id]; var canvasEntry = this.cache[id];
this.canvasFactory.destroy(canvasEntry.canvas); this.canvasFactory.destroy(canvasEntry);
delete this.cache[id]; delete this.cache[id];
} }
} }
@ -46611,7 +46613,7 @@
} }
}, },
get isFontSubpixelAAEnabled() { get isFontSubpixelAAEnabled() {
var ctx = this.canvasFactory.create(10, 10).getContext('2d'); var ctx = this.canvasFactory.create(10, 10).context;
ctx.scale(1.5, 1); ctx.scale(1.5, 1);
ctx.fillText('I', 0, 10); ctx.fillText('I', 0, 10);
var data = ctx.getImageData(0, 0, 10, 10).data; var data = ctx.getImageData(0, 0, 10, 10).data;

46
build/pdf.js

@ -23,8 +23,8 @@
} }
}(this, function (exports) { }(this, function (exports) {
'use strict'; 'use strict';
var pdfjsVersion = '1.7.256'; var pdfjsVersion = '1.7.258';
var pdfjsBuild = 'd3ae5b38'; var pdfjsBuild = '9b0e0954';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -2263,20 +2263,26 @@
create: function DOMCanvasFactory_create(width, height) { create: function DOMCanvasFactory_create(width, height) {
assert(width > 0 && height > 0, 'invalid canvas size'); assert(width > 0 && height > 0, 'invalid canvas size');
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
var context = canvas.getContext('2d');
canvas.width = width; canvas.width = width;
canvas.height = height; canvas.height = height;
return canvas; return {
canvas: canvas,
context: context
};
}, },
reset: function DOMCanvasFactory_reset(canvas, width, height) { reset: function DOMCanvasFactory_reset(canvasAndContextPair, width, height) {
assert(canvas, 'canvas is not specified'); assert(canvasAndContextPair.canvas, 'canvas is not specified');
assert(width > 0 && height > 0, 'invalid canvas size'); assert(width > 0 && height > 0, 'invalid canvas size');
canvas.width = width; canvasAndContextPair.canvas.width = width;
canvas.height = height; canvasAndContextPair.canvas.height = height;
}, },
destroy: function DOMCanvasFactory_destroy(canvas) { destroy: function DOMCanvasFactory_destroy(canvasAndContextPair) {
assert(canvas, 'canvas is not specified'); assert(canvasAndContextPair.canvas, 'canvas is not specified');
canvas.width = 0; canvasAndContextPair.canvas.width = 0;
canvas.height = 0; canvasAndContextPair.canvas.height = 0;
canvasAndContextPair.canvas = null;
canvasAndContextPair.context = null;
} }
}; };
var CustomStyle = function CustomStyleClosure() { var CustomStyle = function CustomStyleClosure() {
@ -5859,25 +5865,21 @@
var canvasEntry; var canvasEntry;
if (this.cache[id] !== undefined) { if (this.cache[id] !== undefined) {
canvasEntry = this.cache[id]; canvasEntry = this.cache[id];
this.canvasFactory.reset(canvasEntry.canvas, width, height); this.canvasFactory.reset(canvasEntry, width, height);
canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0); canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);
} else { } else {
var canvas = this.canvasFactory.create(width, height); canvasEntry = this.canvasFactory.create(width, height);
var ctx = canvas.getContext('2d'); this.cache[id] = canvasEntry;
if (trackTransform) {
addContextCurrentTransform(ctx);
} }
this.cache[id] = canvasEntry = { if (trackTransform) {
canvas: canvas, addContextCurrentTransform(canvasEntry.context);
context: ctx
};
} }
return canvasEntry; return canvasEntry;
}, },
clear: function () { clear: function () {
for (var id in this.cache) { for (var id in this.cache) {
var canvasEntry = this.cache[id]; var canvasEntry = this.cache[id];
this.canvasFactory.destroy(canvasEntry.canvas); this.canvasFactory.destroy(canvasEntry);
delete this.cache[id]; delete this.cache[id];
} }
} }
@ -6896,7 +6898,7 @@
} }
}, },
get isFontSubpixelAAEnabled() { get isFontSubpixelAAEnabled() {
var ctx = this.canvasFactory.create(10, 10).getContext('2d'); var ctx = this.canvasFactory.create(10, 10).context;
ctx.scale(1.5, 1); ctx.scale(1.5, 1);
ctx.fillText('I', 0, 10); ctx.fillText('I', 0, 10);
var data = ctx.getImageData(0, 0, 10, 10).data; var data = ctx.getImageData(0, 0, 10, 10).data;

10
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

4
build/pdf.worker.js vendored

@ -23,8 +23,8 @@
} }
}(this, function (exports) { }(this, function (exports) {
'use strict'; 'use strict';
var pdfjsVersion = '1.7.256'; var pdfjsVersion = '1.7.258';
var pdfjsBuild = 'd3ae5b38'; var pdfjsBuild = '9b0e0954';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {

2
package.json

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

Loading…
Cancel
Save