Browse Source

PDF.js version 1.3.154 - See mozilla/pdf.js@4399d0116946c0696afc6d038acb534129f655a1

master v1.3.154
Pdf Bot 9 years ago
parent
commit
ff75939a9e
  1. 2
      bower.json
  2. 19
      build/pdf.combined.js
  3. 19
      build/pdf.js
  4. 15
      build/pdf.worker.js
  5. 2
      package.json
  6. 6
      web/pdf_viewer.js

2
bower.json

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

19
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
typeof global !== 'undefined' ? global : this).PDFJS = {}; typeof global !== 'undefined' ? global : this).PDFJS = {};
} }
PDFJS.version = '1.3.152'; PDFJS.version = '1.3.154';
PDFJS.build = '96d8b8f'; PDFJS.build = '4399d01';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -9972,6 +9972,16 @@ var XRefParseException = (function XRefParseExceptionClosure() {
return XRefParseException; return XRefParseException;
})(); })();
var NullCharactersRegExp = /\x00/g;
function removeNullCharacters(str) {
if (typeof str !== 'string') {
warn('The argument for removeNullCharacters must be a string.');
return str;
}
return str.replace(NullCharactersRegExp, '');
}
PDFJS.removeNullCharacters = removeNullCharacters;
function bytesToString(bytes) { function bytesToString(bytes) {
assert(bytes !== null && typeof bytes === 'object' && assert(bytes !== null && typeof bytes === 'object' &&
@ -11150,6 +11160,7 @@ exports.log2 = log2;
exports.readInt8 = readInt8; exports.readInt8 = readInt8;
exports.readUint16 = readUint16; exports.readUint16 = readUint16;
exports.readUint32 = readUint32; exports.readUint32 = readUint32;
exports.removeNullCharacters = removeNullCharacters;
exports.shadow = shadow; exports.shadow = shadow;
exports.string32 = string32; exports.string32 = string32;
exports.stringToBytes = stringToBytes; exports.stringToBytes = stringToBytes;
@ -15527,6 +15538,7 @@ var AnnotationType = sharedUtil.AnnotationType;
var Util = sharedUtil.Util; var Util = sharedUtil.Util;
var isExternalLinkTargetSet = sharedUtil.isExternalLinkTargetSet; var isExternalLinkTargetSet = sharedUtil.isExternalLinkTargetSet;
var LinkTargetStringMap = sharedUtil.LinkTargetStringMap; var LinkTargetStringMap = sharedUtil.LinkTargetStringMap;
var removeNullCharacters = sharedUtil.removeNullCharacters;
var warn = sharedUtil.warn; var warn = sharedUtil.warn;
var CustomStyle = displayDOMUtils.CustomStyle; var CustomStyle = displayDOMUtils.CustomStyle;
@ -15726,7 +15738,8 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() {
this.container.className = 'linkAnnotation'; this.container.className = 'linkAnnotation';
var link = document.createElement('a'); var link = document.createElement('a');
link.href = link.title = this.data.url || ''; link.href = link.title = (this.data.url ?
removeNullCharacters(this.data.url) : '');
if (this.data.url && isExternalLinkTargetSet()) { if (this.data.url && isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget]; link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];

19
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
typeof global !== 'undefined' ? global : this).PDFJS = {}; typeof global !== 'undefined' ? global : this).PDFJS = {};
} }
PDFJS.version = '1.3.152'; PDFJS.version = '1.3.154';
PDFJS.build = '96d8b8f'; PDFJS.build = '4399d01';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -607,6 +607,16 @@ var XRefParseException = (function XRefParseExceptionClosure() {
return XRefParseException; return XRefParseException;
})(); })();
var NullCharactersRegExp = /\x00/g;
function removeNullCharacters(str) {
if (typeof str !== 'string') {
warn('The argument for removeNullCharacters must be a string.');
return str;
}
return str.replace(NullCharactersRegExp, '');
}
PDFJS.removeNullCharacters = removeNullCharacters;
function bytesToString(bytes) { function bytesToString(bytes) {
assert(bytes !== null && typeof bytes === 'object' && assert(bytes !== null && typeof bytes === 'object' &&
@ -1785,6 +1795,7 @@ exports.log2 = log2;
exports.readInt8 = readInt8; exports.readInt8 = readInt8;
exports.readUint16 = readUint16; exports.readUint16 = readUint16;
exports.readUint32 = readUint32; exports.readUint32 = readUint32;
exports.removeNullCharacters = removeNullCharacters;
exports.shadow = shadow; exports.shadow = shadow;
exports.string32 = string32; exports.string32 = string32;
exports.stringToBytes = stringToBytes; exports.stringToBytes = stringToBytes;
@ -1807,6 +1818,7 @@ var AnnotationType = sharedUtil.AnnotationType;
var Util = sharedUtil.Util; var Util = sharedUtil.Util;
var isExternalLinkTargetSet = sharedUtil.isExternalLinkTargetSet; var isExternalLinkTargetSet = sharedUtil.isExternalLinkTargetSet;
var LinkTargetStringMap = sharedUtil.LinkTargetStringMap; var LinkTargetStringMap = sharedUtil.LinkTargetStringMap;
var removeNullCharacters = sharedUtil.removeNullCharacters;
var warn = sharedUtil.warn; var warn = sharedUtil.warn;
var CustomStyle = displayDOMUtils.CustomStyle; var CustomStyle = displayDOMUtils.CustomStyle;
@ -2006,7 +2018,8 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() {
this.container.className = 'linkAnnotation'; this.container.className = 'linkAnnotation';
var link = document.createElement('a'); var link = document.createElement('a');
link.href = link.title = this.data.url || ''; link.href = link.title = (this.data.url ?
removeNullCharacters(this.data.url) : '');
if (this.data.url && isExternalLinkTargetSet()) { if (this.data.url && isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget]; link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];

15
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
typeof global !== 'undefined' ? global : this).PDFJS = {}; typeof global !== 'undefined' ? global : this).PDFJS = {};
} }
PDFJS.version = '1.3.152'; PDFJS.version = '1.3.154';
PDFJS.build = '96d8b8f'; PDFJS.build = '4399d01';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -9904,6 +9904,16 @@ var XRefParseException = (function XRefParseExceptionClosure() {
return XRefParseException; return XRefParseException;
})(); })();
var NullCharactersRegExp = /\x00/g;
function removeNullCharacters(str) {
if (typeof str !== 'string') {
warn('The argument for removeNullCharacters must be a string.');
return str;
}
return str.replace(NullCharactersRegExp, '');
}
PDFJS.removeNullCharacters = removeNullCharacters;
function bytesToString(bytes) { function bytesToString(bytes) {
assert(bytes !== null && typeof bytes === 'object' && assert(bytes !== null && typeof bytes === 'object' &&
@ -11082,6 +11092,7 @@ exports.log2 = log2;
exports.readInt8 = readInt8; exports.readInt8 = readInt8;
exports.readUint16 = readUint16; exports.readUint16 = readUint16;
exports.readUint32 = readUint32; exports.readUint32 = readUint32;
exports.removeNullCharacters = removeNullCharacters;
exports.shadow = shadow; exports.shadow = shadow;
exports.string32 = string32; exports.string32 = string32;
exports.stringToBytes = stringToBytes; exports.stringToBytes = stringToBytes;

2
package.json

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

6
web/pdf_viewer.js

@ -34,12 +34,6 @@ var MAX_AUTO_SCALE = 1.25;
var SCROLLBAR_PADDING = 40; var SCROLLBAR_PADDING = 40;
var VERTICAL_PADDING = 5; var VERTICAL_PADDING = 5;
var NullCharactersRegExp = /\x00/g;
function removeNullCharacters(str) {
return str.replace(NullCharactersRegExp, '');
}
function getFileName(url) { function getFileName(url) {
var anchor = url.indexOf('#'); var anchor = url.indexOf('#');
var query = url.indexOf('?'); var query = url.indexOf('?');

Loading…
Cancel
Save