Browse Source

PDF.js version 1.3.224 - See mozilla/pdf.js@1eea0db897196417609ea3223fc9bd9728ed68ed

master v1.3.224
Pdf Bot 9 years ago
parent
commit
412925031d
  1. 2
      bower.json
  2. 58
      build/pdf.combined.js
  3. 42
      build/pdf.js
  4. 41
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

58
build/pdf.combined.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.3.222';
var pdfjsBuild = 'd9e21a3';
var pdfjsVersion = '1.3.224';
var pdfjsBuild = '1eea0db';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -9806,6 +9806,26 @@ function isValidUrl(url, allowRelative) { @@ -9806,6 +9806,26 @@ function isValidUrl(url, allowRelative) {
}
PDFJS.isValidUrl = isValidUrl;
/**
* Adds various attributes (href, title, target, rel) to hyperlinks.
* @param {HTMLLinkElement} link - The link element.
* @param {Object} params - An object with the properties:
* @param {string} params.url - An absolute URL.
*/
function addLinkAttributes(link, params) {
var url = params && params.url;
link.href = link.title = (url ? removeNullCharacters(url) : '');
if (url) {
if (isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];
}
// Strip referrer from the URL.
link.rel = PDFJS.externalLinkRel;
}
}
PDFJS.addLinkAttributes = addLinkAttributes;
function shadow(obj, prop, value) {
Object.defineProperty(obj, prop, { value: value,
enumerable: true,
@ -11768,6 +11788,7 @@ exports.isInt = isInt; @@ -11768,6 +11788,7 @@ exports.isInt = isInt;
exports.isNum = isNum;
exports.isString = isString;
exports.isValidUrl = isValidUrl;
exports.addLinkAttributes = addLinkAttributes;
exports.loadJpegStream = loadJpegStream;
exports.log2 = log2;
exports.readInt8 = readInt8;
@ -16149,9 +16170,7 @@ exports.isStream = isStream; @@ -16149,9 +16170,7 @@ exports.isStream = isStream;
var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType;
var AnnotationType = sharedUtil.AnnotationType;
var Util = sharedUtil.Util;
var isExternalLinkTargetSet = sharedUtil.isExternalLinkTargetSet;
var LinkTargetStringMap = sharedUtil.LinkTargetStringMap;
var removeNullCharacters = sharedUtil.removeNullCharacters;
var addLinkAttributes = sharedUtil.addLinkAttributes;
var warn = sharedUtil.warn;
var CustomStyle = displayDOMUtils.CustomStyle;
@ -16351,17 +16370,7 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() { @@ -16351,17 +16370,7 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() {
this.container.className = 'linkAnnotation';
var link = document.createElement('a');
link.href = link.title = (this.data.url ?
removeNullCharacters(this.data.url) : '');
if (this.data.url && isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];
}
// Strip referrer from the URL.
if (this.data.url) {
link.rel = PDFJS.externalLinkRel;
}
addLinkAttributes(link, { url: this.data.url });
if (!this.data.url) {
if (this.data.action) {
@ -29333,6 +29342,7 @@ var shadow = sharedUtil.shadow; @@ -29333,6 +29342,7 @@ var shadow = sharedUtil.shadow;
var stringToPDFString = sharedUtil.stringToPDFString;
var stringToUTF8String = sharedUtil.stringToUTF8String;
var warn = sharedUtil.warn;
var isValidUrl = sharedUtil.isValidUrl;
var Ref = corePrimitives.Ref;
var RefSet = corePrimitives.RefSet;
var RefSetCache = corePrimitives.RefSetCache;
@ -29432,9 +29442,17 @@ var Catalog = (function CatalogClosure() { @@ -29432,9 +29442,17 @@ var Catalog = (function CatalogClosure() {
if (!outlineDict.has('Title')) {
error('Invalid outline item');
}
var dest = outlineDict.get('A');
if (dest) {
dest = dest.get('D');
var actionDict = outlineDict.get('A'), dest = null, url = null;
if (actionDict) {
var destEntry = actionDict.get('D');
if (destEntry) {
dest = destEntry;
} else {
var uriEntry = actionDict.get('URI');
if (isString(uriEntry) && isValidUrl(uriEntry, false)) {
url = uriEntry;
}
}
} else if (outlineDict.has('Dest')) {
dest = outlineDict.getRaw('Dest');
if (isName(dest)) {
@ -29444,6 +29462,7 @@ var Catalog = (function CatalogClosure() { @@ -29444,6 +29462,7 @@ var Catalog = (function CatalogClosure() {
var title = outlineDict.get('Title');
var outlineItem = {
dest: dest,
url: url,
title: stringToPDFString(title),
color: outlineDict.get('C') || [0, 0, 0],
count: outlineDict.get('Count'),
@ -31676,6 +31695,7 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() { @@ -31676,6 +31695,7 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
* italic: boolean,
* color: rgb array,
* dest: dest obj,
* url: string,
* items: array of more items like this
* },
* ...

42
build/pdf.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.3.222';
var pdfjsBuild = 'd9e21a3';
var pdfjsVersion = '1.3.224';
var pdfjsBuild = '1eea0db';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -441,6 +441,26 @@ function isValidUrl(url, allowRelative) { @@ -441,6 +441,26 @@ function isValidUrl(url, allowRelative) {
}
PDFJS.isValidUrl = isValidUrl;
/**
* Adds various attributes (href, title, target, rel) to hyperlinks.
* @param {HTMLLinkElement} link - The link element.
* @param {Object} params - An object with the properties:
* @param {string} params.url - An absolute URL.
*/
function addLinkAttributes(link, params) {
var url = params && params.url;
link.href = link.title = (url ? removeNullCharacters(url) : '');
if (url) {
if (isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];
}
// Strip referrer from the URL.
link.rel = PDFJS.externalLinkRel;
}
}
PDFJS.addLinkAttributes = addLinkAttributes;
function shadow(obj, prop, value) {
Object.defineProperty(obj, prop, { value: value,
enumerable: true,
@ -2403,6 +2423,7 @@ exports.isInt = isInt; @@ -2403,6 +2423,7 @@ exports.isInt = isInt;
exports.isNum = isNum;
exports.isString = isString;
exports.isValidUrl = isValidUrl;
exports.addLinkAttributes = addLinkAttributes;
exports.loadJpegStream = loadJpegStream;
exports.log2 = log2;
exports.readInt8 = readInt8;
@ -2429,9 +2450,7 @@ exports.warn = warn; @@ -2429,9 +2450,7 @@ exports.warn = warn;
var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType;
var AnnotationType = sharedUtil.AnnotationType;
var Util = sharedUtil.Util;
var isExternalLinkTargetSet = sharedUtil.isExternalLinkTargetSet;
var LinkTargetStringMap = sharedUtil.LinkTargetStringMap;
var removeNullCharacters = sharedUtil.removeNullCharacters;
var addLinkAttributes = sharedUtil.addLinkAttributes;
var warn = sharedUtil.warn;
var CustomStyle = displayDOMUtils.CustomStyle;
@ -2631,17 +2650,7 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() { @@ -2631,17 +2650,7 @@ var LinkAnnotationElement = (function LinkAnnotationElementClosure() {
this.container.className = 'linkAnnotation';
var link = document.createElement('a');
link.href = link.title = (this.data.url ?
removeNullCharacters(this.data.url) : '');
if (this.data.url && isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];
}
// Strip referrer from the URL.
if (this.data.url) {
link.rel = PDFJS.externalLinkRel;
}
addLinkAttributes(link, { url: this.data.url });
if (!this.data.url) {
if (this.data.action) {
@ -8885,6 +8894,7 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() { @@ -8885,6 +8894,7 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
* italic: boolean,
* color: rgb array,
* dest: dest obj,
* url: string,
* items: array of more items like this
* },
* ...

41
build/pdf.worker.js vendored

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.3.222';
var pdfjsBuild = 'd9e21a3';
var pdfjsVersion = '1.3.224';
var pdfjsBuild = '1eea0db';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -9738,6 +9738,26 @@ function isValidUrl(url, allowRelative) { @@ -9738,6 +9738,26 @@ function isValidUrl(url, allowRelative) {
}
PDFJS.isValidUrl = isValidUrl;
/**
* Adds various attributes (href, title, target, rel) to hyperlinks.
* @param {HTMLLinkElement} link - The link element.
* @param {Object} params - An object with the properties:
* @param {string} params.url - An absolute URL.
*/
function addLinkAttributes(link, params) {
var url = params && params.url;
link.href = link.title = (url ? removeNullCharacters(url) : '');
if (url) {
if (isExternalLinkTargetSet()) {
link.target = LinkTargetStringMap[PDFJS.externalLinkTarget];
}
// Strip referrer from the URL.
link.rel = PDFJS.externalLinkRel;
}
}
PDFJS.addLinkAttributes = addLinkAttributes;
function shadow(obj, prop, value) {
Object.defineProperty(obj, prop, { value: value,
enumerable: true,
@ -11700,6 +11720,7 @@ exports.isInt = isInt; @@ -11700,6 +11720,7 @@ exports.isInt = isInt;
exports.isNum = isNum;
exports.isString = isString;
exports.isValidUrl = isValidUrl;
exports.addLinkAttributes = addLinkAttributes;
exports.loadJpegStream = loadJpegStream;
exports.log2 = log2;
exports.readInt8 = readInt8;
@ -23512,6 +23533,7 @@ var shadow = sharedUtil.shadow; @@ -23512,6 +23533,7 @@ var shadow = sharedUtil.shadow;
var stringToPDFString = sharedUtil.stringToPDFString;
var stringToUTF8String = sharedUtil.stringToUTF8String;
var warn = sharedUtil.warn;
var isValidUrl = sharedUtil.isValidUrl;
var Ref = corePrimitives.Ref;
var RefSet = corePrimitives.RefSet;
var RefSetCache = corePrimitives.RefSetCache;
@ -23611,9 +23633,17 @@ var Catalog = (function CatalogClosure() { @@ -23611,9 +23633,17 @@ var Catalog = (function CatalogClosure() {
if (!outlineDict.has('Title')) {
error('Invalid outline item');
}
var dest = outlineDict.get('A');
if (dest) {
dest = dest.get('D');
var actionDict = outlineDict.get('A'), dest = null, url = null;
if (actionDict) {
var destEntry = actionDict.get('D');
if (destEntry) {
dest = destEntry;
} else {
var uriEntry = actionDict.get('URI');
if (isString(uriEntry) && isValidUrl(uriEntry, false)) {
url = uriEntry;
}
}
} else if (outlineDict.has('Dest')) {
dest = outlineDict.getRaw('Dest');
if (isName(dest)) {
@ -23623,6 +23653,7 @@ var Catalog = (function CatalogClosure() { @@ -23623,6 +23653,7 @@ var Catalog = (function CatalogClosure() {
var title = outlineDict.get('Title');
var outlineItem = {
dest: dest,
url: url,
title: stringToPDFString(title),
color: outlineDict.get('C') || [0, 0, 0],
count: outlineDict.get('Count'),

2
package.json

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

Loading…
Cancel
Save