Browse Source

PDF.js version 1.7.244 - See mozilla/pdf.js@92e5fb099e54949055c15e14a930db4f5b366cc4

master v1.7.244
Brendan Dahl 8 years ago
parent
commit
f6b46c5c11
  1. 2
      bower.json
  2. 335
      build/pdf.combined.js
  3. 22
      build/pdf.js
  4. 10
      build/pdf.min.js
  5. 317
      build/pdf.worker.js
  6. 32
      build/pdf.worker.min.js
  7. 2
      package.json
  8. 13
      web/pdf_viewer.js

2
bower.json

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

335
build/pdf.combined.js

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
}
}(this, function (exports) {
'use strict';
var pdfjsVersion = '1.7.235';
var pdfjsBuild = '3f320f0';
var pdfjsVersion = '1.7.244';
var pdfjsBuild = '92e5fb09';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
@ -6901,7 +6901,6 @@ @@ -6901,7 +6901,6 @@
var encoding = Object.create(null);
var bytes = this.bytes;
var predefined = false;
var hasSupplement = false;
var format, i, ii;
var raw = null;
function readSupplement() {
@ -6951,7 +6950,6 @@ @@ -6951,7 +6950,6 @@
if (format & 0x80) {
bytes[dataStart] &= 0x7f;
readSupplement();
hasSupplement = true;
}
raw = bytes.subarray(dataStart, dataEnd);
}
@ -8265,8 +8263,7 @@ @@ -8265,8 +8263,7 @@
subStream.end = start + length || this.end;
subStream.dict = dict;
return subStream;
},
isStream: true
}
};
return ChunkedStream;
}();
@ -13669,14 +13666,12 @@ @@ -13669,14 +13666,12 @@
var deltaHeight = decodeInteger(contextCache, 'IADH', decoder);
currentHeight += deltaHeight;
var currentWidth = 0;
var totalWidth = 0;
while (true) {
var deltaWidth = decodeInteger(contextCache, 'IADW', decoder);
if (deltaWidth === null) {
break;
}
currentWidth += deltaWidth;
totalWidth += currentWidth;
var bitmap;
if (refinement) {
var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder);
@ -14086,7 +14081,7 @@ @@ -14086,7 +14081,7 @@
delete pageInfo.height;
}
var pageSegmentFlags = data[position + 16];
var pageStripingInformation = readUint16(data, position + 17);
readUint16(data, position + 17);
pageInfo.lossless = !!(pageSegmentFlags & 1);
pageInfo.refinement = !!(pageSegmentFlags & 2);
pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1;
@ -14129,7 +14124,7 @@ @@ -14129,7 +14124,7 @@
header.numberOfPages = readUint32(data, position);
position += 4;
}
var segments = readSegments(header, data, position, end);
readSegments(header, data, position, end);
error('Not implemented');
}
function parseJbig2Chunks(chunks) {
@ -14966,7 +14961,7 @@ @@ -14966,7 +14961,7 @@
resetInterval = readUint16();
break;
case 0xFFDA:
var scanLength = readUint16();
readUint16();
var selectorsCount = data[offset++];
var components = [], component;
for (i = 0; i < selectorsCount; i++) {
@ -24913,7 +24908,6 @@ @@ -24913,7 +24908,6 @@
var isArray = sharedUtil.isArray;
var createObjectURL = sharedUtil.createObjectURL;
var shadow = sharedUtil.shadow;
var warn = sharedUtil.warn;
var isSpace = sharedUtil.isSpace;
var Dict = corePrimitives.Dict;
var isDict = corePrimitives.isDict;
@ -24995,8 +24989,7 @@ @@ -24995,8 +24989,7 @@
},
makeSubStream: function Stream_makeSubStream(start, length, dict) {
return new Stream(this.bytes.buffer, start, length, dict);
},
isStream: true
}
};
return Stream;
}();
@ -31466,6 +31459,7 @@ @@ -31466,6 +31459,7 @@
}(this, function (exports, sharedUtil, displayDOMUtils) {
var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType;
var AnnotationType = sharedUtil.AnnotationType;
var stringToPDFString = sharedUtil.stringToPDFString;
var Util = sharedUtil.Util;
var addLinkAttributes = displayDOMUtils.addLinkAttributes;
var LinkTarget = displayDOMUtils.LinkTarget;
@ -32008,8 +32002,14 @@ @@ -32008,8 +32002,14 @@
var FileAttachmentAnnotationElement = function FileAttachmentAnnotationElementClosure() {
function FileAttachmentAnnotationElement(parameters) {
AnnotationElement.call(this, parameters, true);
this.filename = getFilenameFromUrl(parameters.data.file.filename);
this.content = parameters.data.file.content;
var file = this.data.file;
this.filename = getFilenameFromUrl(file.filename);
this.content = file.content;
this.linkService.onFileAttachmentAnnotation({
id: stringToPDFString(file.filename),
filename: file.filename,
content: file.content
});
}
Util.inherit(FileAttachmentAnnotationElement, AnnotationElement, {
render: function FileAttachmentAnnotationElement_render() {
@ -32043,7 +32043,7 @@ @@ -32043,7 +32043,7 @@
if (!data) {
continue;
}
var properties = {
var element = annotationElementFactory.create({
data: data,
layer: parameters.div,
page: parameters.page,
@ -32052,8 +32052,7 @@ @@ -32052,8 +32052,7 @@
downloadManager: parameters.downloadManager,
imageResourcesPath: parameters.imageResourcesPath || getDefaultSetting('imageResourcesPath'),
renderInteractiveForms: parameters.renderInteractiveForms || false
};
var element = annotationElementFactory.create(properties);
});
if (element.isRenderable) {
parameters.div.appendChild(element.render());
}
@ -35081,264 +35080,6 @@ @@ -35081,264 +35080,6 @@
return AES128Cipher;
}();
var AES256Cipher = function AES256CipherClosure() {
var rcon = new Uint8Array([
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d
]);
var s = new Uint8Array([
0x63,
0x7c,
@ -36897,9 +36638,9 @@ @@ -36897,9 +36638,9 @@
function parseCmap(data, start, end) {
var offset = getUshort(data, start + 2) === 1 ? getLong(data, start + 8) : getLong(data, start + 16);
var format = getUshort(data, start + offset);
var length, ranges, p, i;
var ranges, p, i;
if (format === 4) {
length = getUshort(data, start + offset + 2);
getUshort(data, start + offset + 2);
var segCount = getUshort(data, start + offset + 6) >> 1;
p = start + offset + 14;
ranges = [];
@ -36926,7 +36667,7 @@ @@ -36926,7 +36667,7 @@
}
return ranges;
} else if (format === 12) {
length = getLong(data, start + offset + 4);
getLong(data, start + offset + 4);
var groups = getLong(data, start + offset + 12);
p = start + offset + 16;
ranges = [];
@ -40023,7 +39764,7 @@ @@ -40023,7 +39764,7 @@
error = true;
break;
}
var wy = this.stack.pop();
this.stack.pop();
wx = this.stack.pop();
var sby = this.stack.pop();
sbx = this.stack.pop();
@ -40275,7 +40016,7 @@ @@ -40275,7 +40016,7 @@
}
break;
case 'Subrs':
var num = this.readInt();
this.readInt();
this.getToken();
while ((token = this.getToken()) === 'dup') {
var index = this.readInt();
@ -43317,9 +43058,6 @@ @@ -43317,9 +43058,6 @@
this.sizes = [];
this.missingFile = false;
this.glyphCache = Object.create(null);
var names = name.split('+');
names = names.length > 1 ? names[1] : names[0];
names = names.split(/[-,_]/g)[0];
this.isSerifFont = !!(properties.flags & FontFlags.Serif);
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
@ -43907,7 +43645,7 @@ @@ -43907,7 +43645,7 @@
var segment;
var start = (font.start ? font.start : 0) + cmap.offset;
font.pos = start;
var version = font.getUint16();
font.getUint16();
var numTables = font.getUint16();
var potentialTable;
var canBreak = false;
@ -43953,8 +43691,8 @@ @@ -43953,8 +43691,8 @@
};
}
var format = font.getUint16();
var length = font.getUint16();
var language = font.getUint16();
font.getUint16();
font.getUint16();
var hasShortCmap = false;
var mappings = [];
var j, glyphId;
@ -50303,7 +50041,6 @@ @@ -50303,7 +50041,6 @@
var MessageHandler = sharedUtil.MessageHandler;
var MissingPDFException = sharedUtil.MissingPDFException;
var PageViewport = sharedUtil.PageViewport;
var PasswordResponses = sharedUtil.PasswordResponses;
var PasswordException = sharedUtil.PasswordException;
var StatTimer = sharedUtil.StatTimer;
var UnexpectedResponseException = sharedUtil.UnexpectedResponseException;
@ -52549,22 +52286,11 @@ @@ -52549,22 +52286,11 @@
var width = 0;
var height = 0;
var glyphs = font.charsToGlyphs(chars);
var defaultVMetrics = font.defaultVMetrics;
for (var i = 0; i < glyphs.length; i++) {
var glyph = glyphs[i];
var vMetricX = null;
var vMetricY = null;
var glyphWidth = null;
if (font.vertical) {
if (glyph.vmetric) {
glyphWidth = glyph.vmetric[0];
vMetricX = glyph.vmetric[1];
vMetricY = glyph.vmetric[2];
} else {
glyphWidth = glyph.width;
vMetricX = glyph.width * 0.5;
vMetricY = defaultVMetrics[2];
}
if (font.vertical && glyph.vmetric) {
glyphWidth = glyph.vmetric[0];
} else {
glyphWidth = glyph.width;
}
@ -54600,7 +54326,6 @@ @@ -54600,7 +54326,6 @@
var AnnotationType = sharedUtil.AnnotationType;
var OPS = sharedUtil.OPS;
var Util = sharedUtil.Util;
var isString = sharedUtil.isString;
var isArray = sharedUtil.isArray;
var isInt = sharedUtil.isInt;
var stringToBytes = sharedUtil.stringToBytes;
@ -55953,7 +55678,6 @@ @@ -55953,7 +55678,6 @@
var MissingPDFException = sharedUtil.MissingPDFException;
var UnexpectedResponseException = sharedUtil.UnexpectedResponseException;
var PasswordException = sharedUtil.PasswordException;
var PasswordResponses = sharedUtil.PasswordResponses;
var UnknownErrorException = sharedUtil.UnknownErrorException;
var XRefParseException = sharedUtil.XRefParseException;
var arrayByteLength = sharedUtil.arrayByteLength;
@ -56219,7 +55943,7 @@ @@ -56219,7 +55943,7 @@
var xhr = new XMLHttpRequest();
var responseExists = 'response' in xhr;
try {
var dummy = xhr.responseType;
xhr.responseType;
} catch (e) {
responseExists = false;
}
@ -57162,6 +56886,7 @@ @@ -57162,6 +56886,7 @@
exports.renderTextLayer = pdfjsLibs.pdfjsDisplayTextLayer.renderTextLayer;
exports.AnnotationLayer = pdfjsLibs.pdfjsDisplayAnnotationLayer.AnnotationLayer;
exports.CustomStyle = pdfjsLibs.pdfjsDisplayDOMUtils.CustomStyle;
exports.createPromiseCapability = pdfjsLibs.pdfjsSharedUtil.createPromiseCapability;
exports.PasswordResponses = pdfjsLibs.pdfjsSharedUtil.PasswordResponses;
exports.InvalidPDFException = pdfjsLibs.pdfjsSharedUtil.InvalidPDFException;
exports.MissingPDFException = pdfjsLibs.pdfjsSharedUtil.MissingPDFException;

22
build/pdf.js

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
}
}(this, function (exports) {
'use strict';
var pdfjsVersion = '1.7.235';
var pdfjsBuild = '3f320f0';
var pdfjsVersion = '1.7.244';
var pdfjsBuild = '92e5fb09';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
@ -3780,6 +3780,7 @@ @@ -3780,6 +3780,7 @@
}(this, function (exports, sharedUtil, displayDOMUtils) {
var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType;
var AnnotationType = sharedUtil.AnnotationType;
var stringToPDFString = sharedUtil.stringToPDFString;
var Util = sharedUtil.Util;
var addLinkAttributes = displayDOMUtils.addLinkAttributes;
var LinkTarget = displayDOMUtils.LinkTarget;
@ -4322,8 +4323,14 @@ @@ -4322,8 +4323,14 @@
var FileAttachmentAnnotationElement = function FileAttachmentAnnotationElementClosure() {
function FileAttachmentAnnotationElement(parameters) {
AnnotationElement.call(this, parameters, true);
this.filename = getFilenameFromUrl(parameters.data.file.filename);
this.content = parameters.data.file.content;
var file = this.data.file;
this.filename = getFilenameFromUrl(file.filename);
this.content = file.content;
this.linkService.onFileAttachmentAnnotation({
id: stringToPDFString(file.filename),
filename: file.filename,
content: file.content
});
}
Util.inherit(FileAttachmentAnnotationElement, AnnotationElement, {
render: function FileAttachmentAnnotationElement_render() {
@ -4357,7 +4364,7 @@ @@ -4357,7 +4364,7 @@
if (!data) {
continue;
}
var properties = {
var element = annotationElementFactory.create({
data: data,
layer: parameters.div,
page: parameters.page,
@ -4366,8 +4373,7 @@ @@ -4366,8 +4373,7 @@
downloadManager: parameters.downloadManager,
imageResourcesPath: parameters.imageResourcesPath || getDefaultSetting('imageResourcesPath'),
renderInteractiveForms: parameters.renderInteractiveForms || false
};
var element = annotationElementFactory.create(properties);
});
if (element.isRenderable) {
parameters.div.appendChild(element.render());
}
@ -7557,7 +7563,6 @@ @@ -7557,7 +7563,6 @@
var MessageHandler = sharedUtil.MessageHandler;
var MissingPDFException = sharedUtil.MissingPDFException;
var PageViewport = sharedUtil.PageViewport;
var PasswordResponses = sharedUtil.PasswordResponses;
var PasswordException = sharedUtil.PasswordException;
var StatTimer = sharedUtil.StatTimer;
var UnexpectedResponseException = sharedUtil.UnexpectedResponseException;
@ -9022,6 +9027,7 @@ @@ -9022,6 +9027,7 @@
exports.renderTextLayer = pdfjsLibs.pdfjsDisplayTextLayer.renderTextLayer;
exports.AnnotationLayer = pdfjsLibs.pdfjsDisplayAnnotationLayer.AnnotationLayer;
exports.CustomStyle = pdfjsLibs.pdfjsDisplayDOMUtils.CustomStyle;
exports.createPromiseCapability = pdfjsLibs.pdfjsSharedUtil.createPromiseCapability;
exports.PasswordResponses = pdfjsLibs.pdfjsSharedUtil.PasswordResponses;
exports.InvalidPDFException = pdfjsLibs.pdfjsSharedUtil.InvalidPDFException;
exports.MissingPDFException = pdfjsLibs.pdfjsSharedUtil.MissingPDFException;

10
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

317
build/pdf.worker.js vendored

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
}
}(this, function (exports) {
'use strict';
var pdfjsVersion = '1.7.235';
var pdfjsBuild = '3f320f0';
var pdfjsVersion = '1.7.244';
var pdfjsBuild = '92e5fb09';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
@ -6901,7 +6901,6 @@ @@ -6901,7 +6901,6 @@
var encoding = Object.create(null);
var bytes = this.bytes;
var predefined = false;
var hasSupplement = false;
var format, i, ii;
var raw = null;
function readSupplement() {
@ -6951,7 +6950,6 @@ @@ -6951,7 +6950,6 @@
if (format & 0x80) {
bytes[dataStart] &= 0x7f;
readSupplement();
hasSupplement = true;
}
raw = bytes.subarray(dataStart, dataEnd);
}
@ -8265,8 +8263,7 @@ @@ -8265,8 +8263,7 @@
subStream.end = start + length || this.end;
subStream.dict = dict;
return subStream;
},
isStream: true
}
};
return ChunkedStream;
}();
@ -13669,14 +13666,12 @@ @@ -13669,14 +13666,12 @@
var deltaHeight = decodeInteger(contextCache, 'IADH', decoder);
currentHeight += deltaHeight;
var currentWidth = 0;
var totalWidth = 0;
while (true) {
var deltaWidth = decodeInteger(contextCache, 'IADW', decoder);
if (deltaWidth === null) {
break;
}
currentWidth += deltaWidth;
totalWidth += currentWidth;
var bitmap;
if (refinement) {
var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder);
@ -14086,7 +14081,7 @@ @@ -14086,7 +14081,7 @@
delete pageInfo.height;
}
var pageSegmentFlags = data[position + 16];
var pageStripingInformation = readUint16(data, position + 17);
readUint16(data, position + 17);
pageInfo.lossless = !!(pageSegmentFlags & 1);
pageInfo.refinement = !!(pageSegmentFlags & 2);
pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1;
@ -14129,7 +14124,7 @@ @@ -14129,7 +14124,7 @@
header.numberOfPages = readUint32(data, position);
position += 4;
}
var segments = readSegments(header, data, position, end);
readSegments(header, data, position, end);
error('Not implemented');
}
function parseJbig2Chunks(chunks) {
@ -14966,7 +14961,7 @@ @@ -14966,7 +14961,7 @@
resetInterval = readUint16();
break;
case 0xFFDA:
var scanLength = readUint16();
readUint16();
var selectorsCount = data[offset++];
var components = [], component;
for (i = 0; i < selectorsCount; i++) {
@ -23386,7 +23381,6 @@ @@ -23386,7 +23381,6 @@
var isArray = sharedUtil.isArray;
var createObjectURL = sharedUtil.createObjectURL;
var shadow = sharedUtil.shadow;
var warn = sharedUtil.warn;
var isSpace = sharedUtil.isSpace;
var Dict = corePrimitives.Dict;
var isDict = corePrimitives.isDict;
@ -23468,8 +23462,7 @@ @@ -23468,8 +23462,7 @@
},
makeSubStream: function Stream_makeSubStream(start, length, dict) {
return new Stream(this.bytes.buffer, start, length, dict);
},
isStream: true
}
};
return Stream;
}();
@ -32046,264 +32039,6 @@ @@ -32046,264 +32039,6 @@
return AES128Cipher;
}();
var AES256Cipher = function AES256CipherClosure() {
var rcon = new Uint8Array([
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d,
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
0x1b,
0x36,
0x6c,
0xd8,
0xab,
0x4d,
0x9a,
0x2f,
0x5e,
0xbc,
0x63,
0xc6,
0x97,
0x35,
0x6a,
0xd4,
0xb3,
0x7d,
0xfa,
0xef,
0xc5,
0x91,
0x39,
0x72,
0xe4,
0xd3,
0xbd,
0x61,
0xc2,
0x9f,
0x25,
0x4a,
0x94,
0x33,
0x66,
0xcc,
0x83,
0x1d,
0x3a,
0x74,
0xe8,
0xcb,
0x8d
]);
var s = new Uint8Array([
0x63,
0x7c,
@ -33862,9 +33597,9 @@ @@ -33862,9 +33597,9 @@
function parseCmap(data, start, end) {
var offset = getUshort(data, start + 2) === 1 ? getLong(data, start + 8) : getLong(data, start + 16);
var format = getUshort(data, start + offset);
var length, ranges, p, i;
var ranges, p, i;
if (format === 4) {
length = getUshort(data, start + offset + 2);
getUshort(data, start + offset + 2);
var segCount = getUshort(data, start + offset + 6) >> 1;
p = start + offset + 14;
ranges = [];
@ -33891,7 +33626,7 @@ @@ -33891,7 +33626,7 @@
}
return ranges;
} else if (format === 12) {
length = getLong(data, start + offset + 4);
getLong(data, start + offset + 4);
var groups = getLong(data, start + offset + 12);
p = start + offset + 16;
ranges = [];
@ -36988,7 +36723,7 @@ @@ -36988,7 +36723,7 @@
error = true;
break;
}
var wy = this.stack.pop();
this.stack.pop();
wx = this.stack.pop();
var sby = this.stack.pop();
sbx = this.stack.pop();
@ -37240,7 +36975,7 @@ @@ -37240,7 +36975,7 @@
}
break;
case 'Subrs':
var num = this.readInt();
this.readInt();
this.getToken();
while ((token = this.getToken()) === 'dup') {
var index = this.readInt();
@ -39893,9 +39628,6 @@ @@ -39893,9 +39628,6 @@
this.sizes = [];
this.missingFile = false;
this.glyphCache = Object.create(null);
var names = name.split('+');
names = names.length > 1 ? names[1] : names[0];
names = names.split(/[-,_]/g)[0];
this.isSerifFont = !!(properties.flags & FontFlags.Serif);
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
@ -40483,7 +40215,7 @@ @@ -40483,7 +40215,7 @@
var segment;
var start = (font.start ? font.start : 0) + cmap.offset;
font.pos = start;
var version = font.getUint16();
font.getUint16();
var numTables = font.getUint16();
var potentialTable;
var canBreak = false;
@ -40529,8 +40261,8 @@ @@ -40529,8 +40261,8 @@
};
}
var format = font.getUint16();
var length = font.getUint16();
var language = font.getUint16();
font.getUint16();
font.getUint16();
var hasShortCmap = false;
var mappings = [];
var j, glyphId;
@ -46018,22 +45750,11 @@ @@ -46018,22 +45750,11 @@
var width = 0;
var height = 0;
var glyphs = font.charsToGlyphs(chars);
var defaultVMetrics = font.defaultVMetrics;
for (var i = 0; i < glyphs.length; i++) {
var glyph = glyphs[i];
var vMetricX = null;
var vMetricY = null;
var glyphWidth = null;
if (font.vertical) {
if (glyph.vmetric) {
glyphWidth = glyph.vmetric[0];
vMetricX = glyph.vmetric[1];
vMetricY = glyph.vmetric[2];
} else {
glyphWidth = glyph.width;
vMetricX = glyph.width * 0.5;
vMetricY = defaultVMetrics[2];
}
if (font.vertical && glyph.vmetric) {
glyphWidth = glyph.vmetric[0];
} else {
glyphWidth = glyph.width;
}
@ -47946,7 +47667,6 @@ @@ -47946,7 +47667,6 @@
var AnnotationType = sharedUtil.AnnotationType;
var OPS = sharedUtil.OPS;
var Util = sharedUtil.Util;
var isString = sharedUtil.isString;
var isArray = sharedUtil.isArray;
var isInt = sharedUtil.isInt;
var stringToBytes = sharedUtil.stringToBytes;
@ -49299,7 +49019,6 @@ @@ -49299,7 +49019,6 @@
var MissingPDFException = sharedUtil.MissingPDFException;
var UnexpectedResponseException = sharedUtil.UnexpectedResponseException;
var PasswordException = sharedUtil.PasswordException;
var PasswordResponses = sharedUtil.PasswordResponses;
var UnknownErrorException = sharedUtil.UnknownErrorException;
var XRefParseException = sharedUtil.XRefParseException;
var arrayByteLength = sharedUtil.arrayByteLength;
@ -49565,7 +49284,7 @@ @@ -49565,7 +49284,7 @@
var xhr = new XMLHttpRequest();
var responseExists = 'response' in xhr;
try {
var dummy = xhr.responseType;
xhr.responseType;
} catch (e) {
responseExists = false;
}

32
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

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

13
web/pdf_viewer.js

@ -1608,6 +1608,14 @@ @@ -1608,6 +1608,14 @@
action: action
});
},
onFileAttachmentAnnotation: function (params) {
this.eventBus.dispatch('fileattachmentannotation', {
source: this,
id: params.id,
filename: params.filename,
content: params.content
});
},
cachePageRef: function PDFLinkService_cachePageRef(pageNum, pageRef) {
var refStr = pageRef.num + ' ' + pageRef.gen + ' R';
this._pagesRefCache[refStr] = pageNum;
@ -1690,6 +1698,8 @@ @@ -1690,6 +1698,8 @@
},
executeNamedAction: function (action) {
},
onFileAttachmentAnnotation: function (params) {
},
cachePageRef: function (pageNum, pageRef) {
}
};
@ -1937,7 +1947,6 @@ @@ -1937,7 +1947,6 @@
this.renderingState = RenderingStates.RUNNING;
var self = this;
var pdfPage = this.pdfPage;
var viewport = this.viewport;
var div = this.div;
var canvasWrapper = document.createElement('div');
canvasWrapper.style.width = div.style.width;
@ -2057,8 +2066,6 @@ @@ -2057,8 +2066,6 @@
renderTask.cancel();
}
};
var self = this;
var pdfPage = this.pdfPage;
var viewport = this.viewport;
var canvas = document.createElement('canvas');
canvas.id = 'page' + this.id;

Loading…
Cancel
Save