Browse Source

PDF.js version 2.0.400 - See mozilla/pdf.js@f893bcd41b0b5c3eb96f89f5efe2e2fdce180c1c

master v2.0.400
pdfjsbot 7 years ago
parent
commit
ced747c6a6
  1. 2
      bower.json
  2. 27
      build/pdf.js
  3. 2
      build/pdf.js.map
  4. 2
      build/pdf.min.js
  5. 6
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 2
      lib/core/worker.js
  9. 6
      lib/display/api.js
  10. 17
      lib/display/node_stream.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 2
      package.json

2
bower.json

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

27
build/pdf.js

@ -3283,7 +3283,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.398'; var apiVersion = '2.0.400';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -4691,8 +4691,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.398'; exports.version = version = '2.0.400';
exports.build = build = '80bf6150'; exports.build = build = 'f893bcd4';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -7454,8 +7454,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict"; "use strict";
var pdfjsVersion = '2.0.398'; var pdfjsVersion = '2.0.400';
var pdfjsBuild = '80bf6150'; var pdfjsBuild = 'f893bcd4';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(121); var pdfjsDisplayGlobal = __w_pdfjs_require__(121);
var pdfjsDisplayAPI = __w_pdfjs_require__(59); var pdfjsDisplayAPI = __w_pdfjs_require__(59);
@ -15887,15 +15887,28 @@ var https = require('https');
var url = require('url'); var url = require('url');
var fileUriRegex = /^file:\/\/\/[a-zA-Z]:\//; var fileUriRegex = /^file:\/\/\/[a-zA-Z]:\//;
function parseUrl(sourceUrl) {
var parsedUrl = url.parse(sourceUrl);
if (parsedUrl.protocol === 'file:' || parsedUrl.host) {
return parsedUrl;
}
if (/^[a-z]:[/\\]/i.test(sourceUrl)) {
return url.parse('file:///' + sourceUrl);
}
if (!parsedUrl.host) {
parsedUrl.protocol = 'file:';
}
return parsedUrl;
}
var PDFNodeStream = function () { var PDFNodeStream = function () {
function PDFNodeStream(source) { function PDFNodeStream(source) {
_classCallCheck(this, PDFNodeStream); _classCallCheck(this, PDFNodeStream);
this.source = source; this.source = source;
this.url = url.parse(source.url); this.url = parseUrl(source.url);
this.isHttp = this.url.protocol === 'http:' || this.url.protocol === 'https:'; this.isHttp = this.url.protocol === 'http:' || this.url.protocol === 'https:';
this.isFsUrl = this.url.protocol === 'file:' || !this.url.host; this.isFsUrl = this.url.protocol === 'file:';
this.httpHeaders = this.isHttp && source.httpHeaders || {}; this.httpHeaders = this.isHttp && source.httpHeaders || {};
this._fullRequest = null; this._fullRequest = null;
this._rangeRequestReaders = []; this._rangeRequestReaders = [];

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

6
build/pdf.worker.js vendored

@ -22315,8 +22315,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict"; "use strict";
var pdfjsVersion = '2.0.398'; var pdfjsVersion = '2.0.400';
var pdfjsBuild = '80bf6150'; var pdfjsBuild = 'f893bcd4';
var pdfjsCoreWorker = __w_pdfjs_require__(74); var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22529,7 +22529,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.398'; var workerVersion = '2.0.400';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

2
lib/core/worker.js

@ -223,7 +223,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null; var cancelXHRs = null;
var WorkerTasks = []; var WorkerTasks = [];
var apiVersion = docParams.apiVersion; var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.398'; var workerVersion = '2.0.400';
if (apiVersion !== null && apiVersion !== workerVersion) { if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
} }

6
lib/display/api.js

@ -189,7 +189,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) { if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed')); return Promise.reject(new Error('Worker was destroyed'));
} }
var apiVersion = '2.0.398'; var apiVersion = '2.0.400';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange'); source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch'); source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream'); source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -1597,8 +1597,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '2.0.398'; exports.version = version = '2.0.400';
exports.build = build = '80bf6150'; exports.build = build = 'f893bcd4';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;

17
lib/display/node_stream.js

@ -44,15 +44,28 @@ var https = require('https');
var url = require('url'); var url = require('url');
var fileUriRegex = /^file:\/\/\/[a-zA-Z]:\//; var fileUriRegex = /^file:\/\/\/[a-zA-Z]:\//;
function parseUrl(sourceUrl) {
var parsedUrl = url.parse(sourceUrl);
if (parsedUrl.protocol === 'file:' || parsedUrl.host) {
return parsedUrl;
}
if (/^[a-z]:[/\\]/i.test(sourceUrl)) {
return url.parse('file:///' + sourceUrl);
}
if (!parsedUrl.host) {
parsedUrl.protocol = 'file:';
}
return parsedUrl;
}
var PDFNodeStream = function () { var PDFNodeStream = function () {
function PDFNodeStream(source) { function PDFNodeStream(source) {
_classCallCheck(this, PDFNodeStream); _classCallCheck(this, PDFNodeStream);
this.source = source; this.source = source;
this.url = url.parse(source.url); this.url = parseUrl(source.url);
this.isHttp = this.url.protocol === 'http:' || this.url.protocol === 'https:'; this.isHttp = this.url.protocol === 'http:' || this.url.protocol === 'https:';
this.isFsUrl = this.url.protocol === 'file:' || !this.url.host; this.isFsUrl = this.url.protocol === 'file:';
this.httpHeaders = this.isHttp && source.httpHeaders || {}; this.httpHeaders = this.isHttp && source.httpHeaders || {};
this._fullRequest = null; this._fullRequest = null;
this._rangeRequestReaders = []; this._rangeRequestReaders = [];

4
lib/pdf.js

@ -21,8 +21,8 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.398'; var pdfjsVersion = '2.0.400';
var pdfjsBuild = '80bf6150'; var pdfjsBuild = 'f893bcd4';
var pdfjsSharedUtil = require('./shared/util.js'); var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js'); var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js'); var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@
*/ */
'use strict'; 'use strict';
var pdfjsVersion = '2.0.398'; var pdfjsVersion = '2.0.400';
var pdfjsBuild = '80bf6150'; var pdfjsBuild = 'f893bcd4';
var pdfjsCoreWorker = require('./core/worker.js'); var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
package.json

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