Browse Source

PDF.js version 1.3.161 - See mozilla/pdf.js@4a215f0892183a925dfb04fa12bc482ddc61f7b3

master v1.3.161
Pdf Bot 9 years ago
parent
commit
29b59027a4
  1. 2
      bower.json
  2. 82
      build/pdf.combined.js
  3. 100
      build/pdf.js
  4. 53
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

82
build/pdf.combined.js

@ -13,21 +13,32 @@
* limitations under the License. * limitations under the License.
*/ */
/* jshint globalstrict: false */ /* jshint globalstrict: false */
/* globals PDFJS, global */ /* umdutils ignore */
// Initializing PDFJS global object (if still undefined) (function (root, factory) {
if (typeof PDFJS === 'undefined') { 'use strict';
(typeof window !== 'undefined' ? window : if (typeof define === 'function' && define.amd) {
typeof global !== 'undefined' ? global : this).PDFJS = {}; define('pdfjs-dist/build/pdf.combined', ['exports'], factory);
} } else if (typeof exports !== 'undefined') {
factory(exports);
PDFJS.version = '1.3.158'; } else {
PDFJS.build = '944d1e6'; factory((root.pdfjsDistBuildPdfCombined = {}));
}
(function pdfjsWrapper() { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.3.161';
var pdfjsBuild = '4a215f0';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
(function (root, factory) { (function (root, factory) {
@ -8996,6 +9007,13 @@ var NetworkManager = (function NetworkManagerClosure() {
globalScope.PDFJS = {}; globalScope.PDFJS = {};
} }
if (typeof pdfjsVersion !== 'undefined') {
globalScope.PDFJS.version = pdfjsVersion;
}
if (typeof pdfjsVersion !== 'undefined') {
globalScope.PDFJS.build = pdfjsBuild;
}
globalScope.PDFJS.pdfBug = false; globalScope.PDFJS.pdfBug = false;
exports.globalScope = globalScope; exports.globalScope = globalScope;
@ -30378,10 +30396,10 @@ exports.PostScriptParser = PostScriptParser;
{ {
factory((root.pdfjsDisplayAPI = {}), root.pdfjsSharedUtil, factory((root.pdfjsDisplayAPI = {}), root.pdfjsSharedUtil,
root.pdfjsDisplayFontLoader, root.pdfjsDisplayCanvas, root.pdfjsDisplayFontLoader, root.pdfjsDisplayCanvas,
root.pdfjsSharedGlobal); root.pdfjsDisplayMetadata, root.pdfjsSharedGlobal);
} }
}(this, function (exports, sharedUtil, displayFontLoader, displayCanvas, }(this, function (exports, sharedUtil, displayFontLoader, displayCanvas,
sharedGlobal, amdRequire) { displayMetadata, sharedGlobal, amdRequire) {
var InvalidPDFException = sharedUtil.InvalidPDFException; var InvalidPDFException = sharedUtil.InvalidPDFException;
var MessageHandler = sharedUtil.MessageHandler; var MessageHandler = sharedUtil.MessageHandler;
@ -30405,6 +30423,7 @@ var FontFaceObject = displayFontLoader.FontFaceObject;
var FontLoader = displayFontLoader.FontLoader; var FontLoader = displayFontLoader.FontLoader;
var CanvasGraphics = displayCanvas.CanvasGraphics; var CanvasGraphics = displayCanvas.CanvasGraphics;
var createScratchCanvas = displayCanvas.createScratchCanvas; var createScratchCanvas = displayCanvas.createScratchCanvas;
var Metadata = displayMetadata.Metadata;
var PDFJS = sharedGlobal.PDFJS; var PDFJS = sharedGlobal.PDFJS;
var globalScope = sharedGlobal.globalScope; var globalScope = sharedGlobal.globalScope;
@ -31522,6 +31541,16 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
var PDFWorker = (function PDFWorkerClosure() { var PDFWorker = (function PDFWorkerClosure() {
var nextFakeWorkerId = 0; var nextFakeWorkerId = 0;
function getWorkerSrc() {
if (PDFJS.workerSrc) {
return PDFJS.workerSrc;
}
if (pdfjsFilePath) {
return pdfjsFilePath.replace(/\.js$/i, '.worker.js');
}
error('No PDFJS.workerSrc specified');
}
// Loads worker code into main thread. // Loads worker code into main thread.
function setupFakeWorkerGlobal() { function setupFakeWorkerGlobal() {
if (!PDFJS.fakeWorkerFilesLoadedCapability) { if (!PDFJS.fakeWorkerFilesLoadedCapability) {
@ -32040,7 +32069,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
then(function transportMetadata(results) { then(function transportMetadata(results) {
return { return {
info: results[0], info: results[0],
metadata: (results[1] ? new PDFJS.Metadata(results[1]) : null) metadata: (results[1] ? new Metadata(results[1]) : null)
}; };
}); });
}, },
@ -49025,15 +49054,22 @@ exports.WorkerMessageHandler = WorkerMessageHandler;
})); }));
}).call((typeof window === 'undefined') ? this : window); }).call(pdfjsLibs);
if (!PDFJS.workerSrc && typeof document !== 'undefined') { exports.PDFJS = pdfjsLibs.pdfjsSharedGlobal.PDFJS;
// workerSrc is not set -- using last script url to define default location
PDFJS.workerSrc = (function () { exports.getDocument = pdfjsLibs.pdfjsDisplayAPI.getDocument;
'use strict'; exports.PDFDataRangeTransport =
var pdfJsSrc = document.currentScript.src; pdfjsLibs.pdfjsDisplayAPI.PDFDataRangeTransport;
return pdfJsSrc && pdfJsSrc.replace(/\.js$/i, '.worker.js'); exports.renderTextLayer = pdfjsLibs.pdfjsDisplayTextLayer.renderTextLayer;
})(); exports.AnnotationLayer =
} pdfjsLibs.pdfjsDisplayAnnotationLayer.AnnotationLayer;
exports.CustomStyle = pdfjsLibs.pdfjsDisplayDOMUtils.CustomStyle;
exports.PasswordResponses = pdfjsLibs.pdfjsSharedUtil.PasswordResponses;
exports.InvalidPDFException = pdfjsLibs.pdfjsSharedUtil.InvalidPDFException;
exports.MissingPDFException = pdfjsLibs.pdfjsSharedUtil.MissingPDFException;
exports.UnexpectedResponseException =
pdfjsLibs.pdfjsSharedUtil.UnexpectedResponseException;
}));

100
build/pdf.js

@ -13,21 +13,32 @@
* limitations under the License. * limitations under the License.
*/ */
/* jshint globalstrict: false */ /* jshint globalstrict: false */
/* globals PDFJS, global */ /* umdutils ignore */
// Initializing PDFJS global object (if still undefined) (function (root, factory) {
if (typeof PDFJS === 'undefined') { 'use strict';
(typeof window !== 'undefined' ? window : if (typeof define === 'function' && define.amd) {
typeof global !== 'undefined' ? global : this).PDFJS = {}; define('pdfjs-dist/build/pdf', ['exports'], factory);
} } else if (typeof exports !== 'undefined') {
factory(exports);
PDFJS.version = '1.3.158'; } else {
PDFJS.build = '944d1e6'; factory((root.pdfjsDistBuildPdf = {}));
}
(function pdfjsWrapper() { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.3.161';
var pdfjsBuild = '4a215f0';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
(function (root, factory) { (function (root, factory) {
@ -49,6 +60,13 @@ PDFJS.build = '944d1e6';
globalScope.PDFJS = {}; globalScope.PDFJS = {};
} }
if (typeof pdfjsVersion !== 'undefined') {
globalScope.PDFJS.version = pdfjsVersion;
}
if (typeof pdfjsVersion !== 'undefined') {
globalScope.PDFJS.build = pdfjsBuild;
}
globalScope.PDFJS.pdfBug = false; globalScope.PDFJS.pdfBug = false;
exports.globalScope = globalScope; exports.globalScope = globalScope;
@ -7558,10 +7576,10 @@ exports.createScratchCanvas = createScratchCanvas;
{ {
factory((root.pdfjsDisplayAPI = {}), root.pdfjsSharedUtil, factory((root.pdfjsDisplayAPI = {}), root.pdfjsSharedUtil,
root.pdfjsDisplayFontLoader, root.pdfjsDisplayCanvas, root.pdfjsDisplayFontLoader, root.pdfjsDisplayCanvas,
root.pdfjsSharedGlobal); root.pdfjsDisplayMetadata, root.pdfjsSharedGlobal);
} }
}(this, function (exports, sharedUtil, displayFontLoader, displayCanvas, }(this, function (exports, sharedUtil, displayFontLoader, displayCanvas,
sharedGlobal, amdRequire) { displayMetadata, sharedGlobal, amdRequire) {
var InvalidPDFException = sharedUtil.InvalidPDFException; var InvalidPDFException = sharedUtil.InvalidPDFException;
var MessageHandler = sharedUtil.MessageHandler; var MessageHandler = sharedUtil.MessageHandler;
@ -7585,6 +7603,7 @@ var FontFaceObject = displayFontLoader.FontFaceObject;
var FontLoader = displayFontLoader.FontLoader; var FontLoader = displayFontLoader.FontLoader;
var CanvasGraphics = displayCanvas.CanvasGraphics; var CanvasGraphics = displayCanvas.CanvasGraphics;
var createScratchCanvas = displayCanvas.createScratchCanvas; var createScratchCanvas = displayCanvas.createScratchCanvas;
var Metadata = displayMetadata.Metadata;
var PDFJS = sharedGlobal.PDFJS; var PDFJS = sharedGlobal.PDFJS;
var globalScope = sharedGlobal.globalScope; var globalScope = sharedGlobal.globalScope;
@ -7605,12 +7624,19 @@ if (typeof __webpack_require__ !== 'undefined') {
PDFJS.workerSrc = require('entry?name=[hash]-worker.js!./pdf.worker.js'); PDFJS.workerSrc = require('entry?name=[hash]-worker.js!./pdf.worker.js');
useRequireEnsure = true; useRequireEnsure = true;
} }
var fakeWorkerFilesLoader = useRequireEnsure && function (callback) { if (typeof requirejs !== 'undefined' && requirejs.toUrl) {
PDFJS.workerSrc = requirejs.toUrl('pdfjs-dist/build/pdf.worker.js');
}
var fakeWorkerFilesLoader = useRequireEnsure ? (function (callback) {
require.ensure([], function () { require.ensure([], function () {
require('./pdf.worker.js'); require('./pdf.worker.js');
callback(); callback();
}); });
}; }) : (typeof requirejs !== 'undefined') ? (function (callback) {
requirejs(['pdfjs-dist/build/pdf.worker'], function (worker) {
callback();
});
}) : null;
/** /**
@ -8724,6 +8750,16 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
var PDFWorker = (function PDFWorkerClosure() { var PDFWorker = (function PDFWorkerClosure() {
var nextFakeWorkerId = 0; var nextFakeWorkerId = 0;
function getWorkerSrc() {
if (PDFJS.workerSrc) {
return PDFJS.workerSrc;
}
if (pdfjsFilePath) {
return pdfjsFilePath.replace(/\.js$/i, '.worker.js');
}
error('No PDFJS.workerSrc specified');
}
// Loads worker code into main thread. // Loads worker code into main thread.
function setupFakeWorkerGlobal() { function setupFakeWorkerGlobal() {
if (!PDFJS.fakeWorkerFilesLoadedCapability) { if (!PDFJS.fakeWorkerFilesLoadedCapability) {
@ -8732,7 +8768,7 @@ var PDFWorker = (function PDFWorkerClosure() {
// other files and resolves the promise. In production only the // other files and resolves the promise. In production only the
// pdf.worker.js file is needed. // pdf.worker.js file is needed.
var loader = fakeWorkerFilesLoader || function (callback) { var loader = fakeWorkerFilesLoader || function (callback) {
Util.loadScript(PDFJS.workerSrc, callback); Util.loadScript(getWorkerSrc(), callback);
}; };
loader(function () { loader(function () {
PDFJS.fakeWorkerFilesLoadedCapability.resolve(); PDFJS.fakeWorkerFilesLoadedCapability.resolve();
@ -8772,10 +8808,7 @@ var PDFWorker = (function PDFWorkerClosure() {
// Right now, the requirement is, that an Uint8Array is still an // Right now, the requirement is, that an Uint8Array is still an
// Uint8Array as it arrives on the worker. (Chrome added this with v.15.) // Uint8Array as it arrives on the worker. (Chrome added this with v.15.)
if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') { if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') {
var workerSrc = PDFJS.workerSrc; var workerSrc = getWorkerSrc();
if (!workerSrc) {
error('No PDFJS.workerSrc specified');
}
try { try {
// Some versions of FF can't create a worker on localhost, see: // Some versions of FF can't create a worker on localhost, see:
@ -9327,7 +9360,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
then(function transportMetadata(results) { then(function transportMetadata(results) {
return { return {
info: results[0], info: results[0],
metadata: (results[1] ? new PDFJS.Metadata(results[1]) : null) metadata: (results[1] ? new Metadata(results[1]) : null)
}; };
}); });
}, },
@ -9660,15 +9693,22 @@ exports.PDFPageProxy = PDFPageProxy;
})); }));
}).call((typeof window === 'undefined') ? this : window); }).call(pdfjsLibs);
if (!PDFJS.workerSrc && typeof document !== 'undefined') { exports.PDFJS = pdfjsLibs.pdfjsSharedGlobal.PDFJS;
// workerSrc is not set -- using last script url to define default location
PDFJS.workerSrc = (function () { exports.getDocument = pdfjsLibs.pdfjsDisplayAPI.getDocument;
'use strict'; exports.PDFDataRangeTransport =
var pdfJsSrc = document.currentScript.src; pdfjsLibs.pdfjsDisplayAPI.PDFDataRangeTransport;
return pdfJsSrc && pdfJsSrc.replace(/\.js$/i, '.worker.js'); exports.renderTextLayer = pdfjsLibs.pdfjsDisplayTextLayer.renderTextLayer;
})(); exports.AnnotationLayer =
} pdfjsLibs.pdfjsDisplayAnnotationLayer.AnnotationLayer;
exports.CustomStyle = pdfjsLibs.pdfjsDisplayDOMUtils.CustomStyle;
exports.PasswordResponses = pdfjsLibs.pdfjsSharedUtil.PasswordResponses;
exports.InvalidPDFException = pdfjsLibs.pdfjsSharedUtil.InvalidPDFException;
exports.MissingPDFException = pdfjsLibs.pdfjsSharedUtil.MissingPDFException;
exports.UnexpectedResponseException =
pdfjsLibs.pdfjsSharedUtil.UnexpectedResponseException;
}));

53
build/pdf.worker.js vendored

@ -13,21 +13,32 @@
* limitations under the License. * limitations under the License.
*/ */
/* jshint globalstrict: false */ /* jshint globalstrict: false */
/* globals PDFJS, global */ /* umdutils ignore */
// Initializing PDFJS global object (if still undefined) (function (root, factory) {
if (typeof PDFJS === 'undefined') { 'use strict';
(typeof window !== 'undefined' ? window : if (typeof define === 'function' && define.amd) {
typeof global !== 'undefined' ? global : this).PDFJS = {}; define('pdfjs-dist/build/pdf.worker', ['exports'], factory);
} } else if (typeof exports !== 'undefined') {
factory(exports);
PDFJS.version = '1.3.158'; } else {
PDFJS.build = '944d1e6'; factory((root.pdfjsDistBuildPdfWorker = {}));
}
(function pdfjsWrapper() { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.3.161';
var pdfjsBuild = '4a215f0';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
(function (root, factory) { (function (root, factory) {
@ -8996,6 +9007,13 @@ var NetworkManager = (function NetworkManagerClosure() {
globalScope.PDFJS = {}; globalScope.PDFJS = {};
} }
if (typeof pdfjsVersion !== 'undefined') {
globalScope.PDFJS.version = pdfjsVersion;
}
if (typeof pdfjsVersion !== 'undefined') {
globalScope.PDFJS.build = pdfjsBuild;
}
globalScope.PDFJS.pdfBug = false; globalScope.PDFJS.pdfBug = false;
exports.globalScope = globalScope; exports.globalScope = globalScope;
@ -41211,15 +41229,10 @@ exports.WorkerMessageHandler = WorkerMessageHandler;
})); }));
}).call((typeof window === 'undefined') ? this : window); }).call(pdfjsLibs);
if (!PDFJS.workerSrc && typeof document !== 'undefined') { exports.PDFJS = pdfjsLibs.pdfjsSharedGlobal.PDFJS;
// workerSrc is not set -- using last script url to define default location
PDFJS.workerSrc = (function () { }));
'use strict';
var pdfJsSrc = document.currentScript.src;
return pdfJsSrc && pdfJsSrc.replace(/\.js$/i, '.worker.js');
})();
}

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.3.158", "version": "1.3.161",
"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