Browse Source

PDF.js version 1.6.426 - See mozilla/pdf.js@098acb126958e8f0eb18399f1182a945e5164fd2

master v1.6.426
Pdf Bot 8 years ago
parent
commit
c095e2dd65
  1. 2
      bower.json
  2. 46
      build/pdf.combined.js
  3. 13
      build/pdf.js
  4. 2
      build/pdf.min.js
  5. 37
      build/pdf.worker.js
  6. 2
      build/pdf.worker.min.js
  7. 2
      package.json
  8. 3
      web/compatibility.js
  9. 15
      web/pdf_viewer.js

2
bower.json

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

46
build/pdf.combined.js

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
}
}(this, function (exports) {
'use strict';
var pdfjsVersion = '1.6.424';
var pdfjsBuild = '049d7fa';
var pdfjsVersion = '1.6.426';
var pdfjsBuild = '098acb1';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
@ -6495,11 +6495,10 @@ @@ -6495,11 +6495,10 @@
return (value - 247) * 256 + dict[pos++] + 108;
} else if (value >= 251 && value <= 254) {
return -((value - 251) * 256) - dict[pos++] - 108;
} else {
}
warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
return NaN;
}
}
function parseFloatOperand() {
var str = '';
var eof = 15;
@ -7780,9 +7779,8 @@ @@ -7780,9 +7779,8 @@
encodeNumber: function CFFCompiler_encodeNumber(value) {
if (parseFloat(value) === parseInt(value, 10) && !isNaN(value)) {
return this.encodeInteger(value);
} else {
return this.encodeFloat(value);
}
return this.encodeFloat(value);
},
encodeFloat: function CFFCompiler_encodeFloat(num) {
var value = num.toString();
@ -15070,12 +15068,11 @@ @@ -15070,12 +15068,11 @@
return false;
}
return true;
} else {
}
if (!this.adobe && this.colorTransform === 1) {
return true;
}
return false;
}
},
_convertYccToRgb: function convertYccToRgb(data) {
var Y, Cb, Cr;
@ -15159,9 +15156,8 @@ @@ -15159,9 +15156,8 @@
if (this._isColorConversionNeeded()) {
if (forceRGBoutput) {
return this._convertYcckToRgb(data);
} else {
return this._convertYcckToCmyk(data);
}
return this._convertYcckToCmyk(data);
} else if (forceRGBoutput) {
return this._convertCmykToRgb(data);
}
@ -31293,9 +31289,8 @@ @@ -31293,9 +31289,8 @@
return new RadioButtonWidgetAnnotationElement(parameters);
} else if (parameters.data.checkBox) {
return new CheckboxWidgetAnnotationElement(parameters);
} else {
warn('Unimplemented button widget annotation: pushbutton');
}
warn('Unimplemented button widget annotation: pushbutton');
break;
case 'Ch':
return new ChoiceWidgetAnnotationElement(parameters);
@ -37449,9 +37444,8 @@ @@ -37449,9 +37444,8 @@
0
];
return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
} else {
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
}
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
}
};
}();
@ -47604,9 +47598,8 @@ @@ -47604,9 +47598,8 @@
var objs = this.objs;
if (!objs[objId]) {
return false;
} else {
return objs[objId].resolved;
}
return objs[objId].resolved;
},
hasData: function PDFObjects_hasData(objId) {
return this.isResolved(objId);
@ -47615,9 +47608,8 @@ @@ -47615,9 +47608,8 @@
var objs = this.objs;
if (!objs[objId] || !objs[objId].resolved) {
return null;
} else {
return objs[objId].data;
}
return objs[objId].data;
},
clear: function PDFObjects_clear() {
this.objs = Object.create(null);
@ -48710,11 +48702,13 @@ @@ -48710,11 +48702,13 @@
}
}
function fn_g(x) {
var result;
if (x >= 6 / 29) {
return x * x * x;
result = x * x * x;
} else {
return 108 / 841 * (x - 4 / 29);
result = 108 / 841 * (x - 4 / 29);
}
return result;
}
function decode(value, high1, low2, high2) {
return low2 + value * (high2 - low2) / high1;
@ -48918,9 +48912,8 @@ @@ -48918,9 +48912,8 @@
function handleImageData(image, nativeDecoder) {
if (nativeDecoder && nativeDecoder.canDecode(image)) {
return nativeDecoder.decode(image);
} else {
return Promise.resolve(image);
}
return Promise.resolve(image);
}
function decodeAndClamp(value, addend, coefficient, max) {
value = addend + value * coefficient;
@ -50672,9 +50665,8 @@ @@ -50672,9 +50665,8 @@
return dict.get('Mac');
} else if (dict.has('DOS')) {
return dict.get('DOS');
} else {
return null;
}
return null;
}
FileSpec.prototype = {
get filename() {
@ -52297,9 +52289,8 @@ @@ -52297,9 +52289,8 @@
pattern = Pattern.parseShading(shading, matrix, xref, resources, this.handler);
operatorList.addOp(fn, pattern.getIR());
return Promise.resolve();
} else {
return Promise.reject('Unknown PatternType: ' + typeNum);
}
return Promise.reject('Unknown PatternType: ' + typeNum);
}
operatorList.addOp(fn, args);
return Promise.resolve();
@ -54253,7 +54244,7 @@ @@ -54253,7 +54244,7 @@
operation.fn = fn;
operation.args = args;
return true;
} else {
}
if (isEOF(obj)) {
return false;
}
@ -54265,7 +54256,6 @@ @@ -54265,7 +54256,6 @@
assert(args.length <= 33, 'Too many arguments');
}
}
}
},
preprocessCommand: function EvaluatorPreprocessor_preprocessCommand(fn, args) {
switch (fn | 0) {

13
build/pdf.js

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
}
}(this, function (exports) {
'use strict';
var pdfjsVersion = '1.6.424';
var pdfjsBuild = '049d7fa';
var pdfjsVersion = '1.6.426';
var pdfjsBuild = '098acb1';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
@ -3805,9 +3805,8 @@ @@ -3805,9 +3805,8 @@
return new RadioButtonWidgetAnnotationElement(parameters);
} else if (parameters.data.checkBox) {
return new CheckboxWidgetAnnotationElement(parameters);
} else {
warn('Unimplemented button widget annotation: pushbutton');
}
warn('Unimplemented button widget annotation: pushbutton');
break;
case 'Ch':
return new ChoiceWidgetAnnotationElement(parameters);
@ -8745,9 +8744,8 @@ @@ -8745,9 +8744,8 @@
var objs = this.objs;
if (!objs[objId]) {
return false;
} else {
return objs[objId].resolved;
}
return objs[objId].resolved;
},
hasData: function PDFObjects_hasData(objId) {
return this.isResolved(objId);
@ -8756,9 +8754,8 @@ @@ -8756,9 +8754,8 @@
var objs = this.objs;
if (!objs[objId] || !objs[objId].resolved) {
return null;
} else {
return objs[objId].data;
}
return objs[objId].data;
},
clear: function PDFObjects_clear() {
this.objs = Object.create(null);

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

37
build/pdf.worker.js vendored

@ -23,8 +23,8 @@ @@ -23,8 +23,8 @@
}
}(this, function (exports) {
'use strict';
var pdfjsVersion = '1.6.424';
var pdfjsBuild = '049d7fa';
var pdfjsVersion = '1.6.426';
var pdfjsBuild = '098acb1';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {};
(function pdfjsWrapper() {
@ -6495,11 +6495,10 @@ @@ -6495,11 +6495,10 @@
return (value - 247) * 256 + dict[pos++] + 108;
} else if (value >= 251 && value <= 254) {
return -((value - 251) * 256) - dict[pos++] - 108;
} else {
}
warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
return NaN;
}
}
function parseFloatOperand() {
var str = '';
var eof = 15;
@ -7780,9 +7779,8 @@ @@ -7780,9 +7779,8 @@
encodeNumber: function CFFCompiler_encodeNumber(value) {
if (parseFloat(value) === parseInt(value, 10) && !isNaN(value)) {
return this.encodeInteger(value);
} else {
return this.encodeFloat(value);
}
return this.encodeFloat(value);
},
encodeFloat: function CFFCompiler_encodeFloat(num) {
var value = num.toString();
@ -15070,12 +15068,11 @@ @@ -15070,12 +15068,11 @@
return false;
}
return true;
} else {
}
if (!this.adobe && this.colorTransform === 1) {
return true;
}
return false;
}
},
_convertYccToRgb: function convertYccToRgb(data) {
var Y, Cb, Cr;
@ -15159,9 +15156,8 @@ @@ -15159,9 +15156,8 @@
if (this._isColorConversionNeeded()) {
if (forceRGBoutput) {
return this._convertYcckToRgb(data);
} else {
return this._convertYcckToCmyk(data);
}
return this._convertYcckToCmyk(data);
} else if (forceRGBoutput) {
return this._convertCmykToRgb(data);
}
@ -34415,9 +34411,8 @@ @@ -34415,9 +34411,8 @@
0
];
return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
} else {
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
}
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
}
};
}();
@ -42164,11 +42159,13 @@ @@ -42164,11 +42159,13 @@
}
}
function fn_g(x) {
var result;
if (x >= 6 / 29) {
return x * x * x;
result = x * x * x;
} else {
return 108 / 841 * (x - 4 / 29);
result = 108 / 841 * (x - 4 / 29);
}
return result;
}
function decode(value, high1, low2, high2) {
return low2 + value * (high2 - low2) / high1;
@ -42250,9 +42247,8 @@ @@ -42250,9 +42247,8 @@
function handleImageData(image, nativeDecoder) {
if (nativeDecoder && nativeDecoder.canDecode(image)) {
return nativeDecoder.decode(image);
} else {
return Promise.resolve(image);
}
return Promise.resolve(image);
}
function decodeAndClamp(value, addend, coefficient, max) {
value = addend + value * coefficient;
@ -44004,9 +44000,8 @@ @@ -44004,9 +44000,8 @@
return dict.get('Mac');
} else if (dict.has('DOS')) {
return dict.get('DOS');
} else {
return null;
}
return null;
}
FileSpec.prototype = {
get filename() {
@ -45629,9 +45624,8 @@ @@ -45629,9 +45624,8 @@
pattern = Pattern.parseShading(shading, matrix, xref, resources, this.handler);
operatorList.addOp(fn, pattern.getIR());
return Promise.resolve();
} else {
return Promise.reject('Unknown PatternType: ' + typeNum);
}
return Promise.reject('Unknown PatternType: ' + typeNum);
}
operatorList.addOp(fn, args);
return Promise.resolve();
@ -47585,7 +47579,7 @@ @@ -47585,7 +47579,7 @@
operation.fn = fn;
operation.args = args;
return true;
} else {
}
if (isEOF(obj)) {
return false;
}
@ -47597,7 +47591,6 @@ @@ -47597,7 +47591,6 @@
assert(args.length <= 33, 'Too many arguments');
}
}
}
},
preprocessCommand: function EvaluatorPreprocessor_preprocessCommand(fn, args) {
switch (fn | 0) {

2
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.6.424",
"version": "1.6.426",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

3
web/compatibility.js

@ -202,9 +202,8 @@ if (typeof PDFJS === 'undefined') { @@ -202,9 +202,8 @@ if (typeof PDFJS === 'undefined') {
get: function xmlHttpRequestResponseGet() {
if (this.responseType === 'arraybuffer') {
return new Uint8Array(new VBArray(this.responseBody).toArray());
} else {
return this.responseText;
}
return this.responseText;
}
});
return;

15
web/pdf_viewer.js

@ -347,8 +347,9 @@ @@ -347,8 +347,9 @@
b = q;
}
}
var result;
if (x_ - a / b < c / d - x_) {
return x_ === x ? [
result = x_ === x ? [
a,
b
] : [
@ -356,7 +357,7 @@ @@ -356,7 +357,7 @@
a
];
} else {
return x_ === x ? [
result = x_ === x ? [
c,
d
] : [
@ -364,6 +365,7 @@ @@ -364,6 +365,7 @@
c
];
}
return result;
}
function roundToDivide(x, div) {
var r = x % div;
@ -989,7 +991,7 @@ @@ -989,7 +991,7 @@
offset.matchIdx = previous ? numMatches - 1 : 0;
this.updateMatch(true);
return true;
} else {
}
this.advanceOffsetPage(previous);
if (offset.wrapped) {
offset.matchIdx = null;
@ -999,7 +1001,6 @@ @@ -999,7 +1001,6 @@
}
}
return false;
}
},
updateMatchPosition: function PDFFindController_updateMatchPosition(pageIndex, index, elements, beginIdx) {
if (this.selected.matchIdx === index && this.selected.pageIdx === pageIndex) {
@ -1237,9 +1238,8 @@ @@ -1237,9 +1238,8 @@
this.nextHashParam = null;
this.updatePreviousBookmark = true;
return;
} else {
this.nextHashParam = null;
}
this.nextHashParam = null;
}
if (params.hash) {
if (this.current.hash) {
@ -3104,7 +3104,7 @@ @@ -3104,7 +3104,7 @@
_getVisiblePages: function () {
if (!this.isInPresentationMode) {
return getVisibleElements(this.container, this._pages, true);
} else {
}
var visible = [];
var currentPage = this._pages[this._currentPageNumber - 1];
visible.push({
@ -3116,7 +3116,6 @@ @@ -3116,7 +3116,6 @@
last: currentPage,
views: visible
};
}
},
cleanup: function () {
for (var i = 0, ii = this._pages.length; i < ii; i++) {

Loading…
Cancel
Save