Browse Source

PDF.js version 1.6.244 - See mozilla/pdf.js@2e20000b7147a2a6ff4a01264ec39e594e084f78

master v1.6.244
Pdf Bot 8 years ago
parent
commit
7caeaa9af1
  1. 2
      bower.json
  2. 55
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 55
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

55
build/pdf.combined.js

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.242'; var pdfjsVersion = '1.6.244';
var pdfjsBuild = 'ea5949f'; var pdfjsBuild = '2e20000';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -25741,6 +25741,7 @@
var isSpace = sharedUtil.isSpace; var isSpace = sharedUtil.isSpace;
var Dict = corePrimitives.Dict; var Dict = corePrimitives.Dict;
var isDict = corePrimitives.isDict; var isDict = corePrimitives.isDict;
var isStream = corePrimitives.isStream;
var Jbig2Image = coreJbig2.Jbig2Image; var Jbig2Image = coreJbig2.Jbig2Image;
var JpegImage = coreJpg.JpegImage; var JpegImage = coreJpg.JpegImage;
var JpxImage = coreJpx.JpxImage; var JpxImage = coreJpx.JpxImage;
@ -27067,7 +27068,7 @@
* DecodeStreams. * DecodeStreams.
*/ */
var JpegStream = function JpegStreamClosure() { var JpegStream = function JpegStreamClosure() {
function JpegStream(stream, maybeLength, dict) { function JpegStream(stream, maybeLength, dict, params) {
// Some images may contain 'junk' before the SOI (start-of-image) marker. // Some images may contain 'junk' before the SOI (start-of-image) marker.
// Note: this seems to mainly affect inline images. // Note: this seems to mainly affect inline images.
var ch; var ch;
@ -27082,6 +27083,7 @@
this.stream = stream; this.stream = stream;
this.maybeLength = maybeLength; this.maybeLength = maybeLength;
this.dict = dict; this.dict = dict;
this.params = params;
DecodeStream.call(this, maybeLength); DecodeStream.call(this, maybeLength);
} }
JpegStream.prototype = Object.create(DecodeStream.prototype); JpegStream.prototype = Object.create(DecodeStream.prototype);
@ -27117,9 +27119,8 @@
} }
} }
// Fetching the 'ColorTransform' entry, if it exists. // Fetching the 'ColorTransform' entry, if it exists.
var decodeParams = this.dict.get('DecodeParms', 'DP'); if (isDict(this.params)) {
if (isDict(decodeParams)) { var colorTransform = this.params.get('ColorTransform');
var colorTransform = decodeParams.get('ColorTransform');
if (isInt(colorTransform)) { if (isInt(colorTransform)) {
jpegImage.colorTransform = colorTransform; jpegImage.colorTransform = colorTransform;
} }
@ -27144,10 +27145,11 @@
* the stream behaves like all the other DecodeStreams. * the stream behaves like all the other DecodeStreams.
*/ */
var JpxStream = function JpxStreamClosure() { var JpxStream = function JpxStreamClosure() {
function JpxStream(stream, maybeLength, dict) { function JpxStream(stream, maybeLength, dict, params) {
this.stream = stream; this.stream = stream;
this.maybeLength = maybeLength; this.maybeLength = maybeLength;
this.dict = dict; this.dict = dict;
this.params = params;
DecodeStream.call(this, maybeLength); DecodeStream.call(this, maybeLength);
} }
JpxStream.prototype = Object.create(DecodeStream.prototype); JpxStream.prototype = Object.create(DecodeStream.prototype);
@ -27202,10 +27204,11 @@
* the stream behaves like all the other DecodeStreams. * the stream behaves like all the other DecodeStreams.
*/ */
var Jbig2Stream = function Jbig2StreamClosure() { var Jbig2Stream = function Jbig2StreamClosure() {
function Jbig2Stream(stream, maybeLength, dict) { function Jbig2Stream(stream, maybeLength, dict, params) {
this.stream = stream; this.stream = stream;
this.maybeLength = maybeLength; this.maybeLength = maybeLength;
this.dict = dict; this.dict = dict;
this.params = params;
DecodeStream.call(this, maybeLength); DecodeStream.call(this, maybeLength);
} }
Jbig2Stream.prototype = Object.create(DecodeStream.prototype); Jbig2Stream.prototype = Object.create(DecodeStream.prototype);
@ -27222,23 +27225,16 @@
} }
var jbig2Image = new Jbig2Image(); var jbig2Image = new Jbig2Image();
var chunks = []; var chunks = [];
var decodeParams = this.dict.getArray('DecodeParms', 'DP'); if (isDict(this.params)) {
// According to the PDF specification, DecodeParms can be either var globalsStream = this.params.get('JBIG2Globals');
// a dictionary, or an array whose elements are dictionaries. if (isStream(globalsStream)) {
if (isArray(decodeParams)) { var globals = globalsStream.getBytes();
if (decodeParams.length > 1) { chunks.push({
warn('JBIG2 - \'DecodeParms\' array with multiple elements ' + 'not supported.'); data: globals,
} start: 0,
decodeParams = decodeParams[0]; end: globals.length
} });
if (decodeParams && decodeParams.has('JBIG2Globals')) { }
var globalsStream = decodeParams.get('JBIG2Globals');
var globals = globalsStream.getBytes();
chunks.push({
data: globals,
start: 0,
end: globals.length
});
} }
chunks.push({ chunks.push({
data: this.bytes, data: this.bytes,
@ -39806,6 +39802,9 @@
var filter = dict.get('Filter', 'F'); var filter = dict.get('Filter', 'F');
var params = dict.get('DecodeParms', 'DP'); var params = dict.get('DecodeParms', 'DP');
if (isName(filter)) { if (isName(filter)) {
if (isArray(params)) {
params = params[0];
}
return this.makeFilter(stream, filter.name, length, params); return this.makeFilter(stream, filter.name, length, params);
} }
var maybeLength = length; var maybeLength = length;
@ -39861,11 +39860,11 @@
} }
if (name === 'DCTDecode' || name === 'DCT') { if (name === 'DCTDecode' || name === 'DCT') {
xrefStreamStats[StreamType.DCT] = true; xrefStreamStats[StreamType.DCT] = true;
return new JpegStream(stream, maybeLength, stream.dict); return new JpegStream(stream, maybeLength, stream.dict, params);
} }
if (name === 'JPXDecode' || name === 'JPX') { if (name === 'JPXDecode' || name === 'JPX') {
xrefStreamStats[StreamType.JPX] = true; xrefStreamStats[StreamType.JPX] = true;
return new JpxStream(stream, maybeLength, stream.dict); return new JpxStream(stream, maybeLength, stream.dict, params);
} }
if (name === 'ASCII85Decode' || name === 'A85') { if (name === 'ASCII85Decode' || name === 'A85') {
xrefStreamStats[StreamType.A85] = true; xrefStreamStats[StreamType.A85] = true;
@ -39885,7 +39884,7 @@
} }
if (name === 'JBIG2Decode') { if (name === 'JBIG2Decode') {
xrefStreamStats[StreamType.JBIG] = true; xrefStreamStats[StreamType.JBIG] = true;
return new Jbig2Stream(stream, maybeLength, stream.dict); return new Jbig2Stream(stream, maybeLength, stream.dict, params);
} }
warn('filter "' + name + '" not supported yet'); warn('filter "' + name + '" not supported yet');
return stream; return stream;

4
build/pdf.js

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.242'; var pdfjsVersion = '1.6.244';
var pdfjsBuild = 'ea5949f'; var pdfjsBuild = '2e20000';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {

55
build/pdf.worker.js vendored

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.242'; var pdfjsVersion = '1.6.244';
var pdfjsBuild = 'ea5949f'; var pdfjsBuild = '2e20000';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -24086,6 +24086,7 @@
var isSpace = sharedUtil.isSpace; var isSpace = sharedUtil.isSpace;
var Dict = corePrimitives.Dict; var Dict = corePrimitives.Dict;
var isDict = corePrimitives.isDict; var isDict = corePrimitives.isDict;
var isStream = corePrimitives.isStream;
var Jbig2Image = coreJbig2.Jbig2Image; var Jbig2Image = coreJbig2.Jbig2Image;
var JpegImage = coreJpg.JpegImage; var JpegImage = coreJpg.JpegImage;
var JpxImage = coreJpx.JpxImage; var JpxImage = coreJpx.JpxImage;
@ -25412,7 +25413,7 @@
* DecodeStreams. * DecodeStreams.
*/ */
var JpegStream = function JpegStreamClosure() { var JpegStream = function JpegStreamClosure() {
function JpegStream(stream, maybeLength, dict) { function JpegStream(stream, maybeLength, dict, params) {
// Some images may contain 'junk' before the SOI (start-of-image) marker. // Some images may contain 'junk' before the SOI (start-of-image) marker.
// Note: this seems to mainly affect inline images. // Note: this seems to mainly affect inline images.
var ch; var ch;
@ -25427,6 +25428,7 @@
this.stream = stream; this.stream = stream;
this.maybeLength = maybeLength; this.maybeLength = maybeLength;
this.dict = dict; this.dict = dict;
this.params = params;
DecodeStream.call(this, maybeLength); DecodeStream.call(this, maybeLength);
} }
JpegStream.prototype = Object.create(DecodeStream.prototype); JpegStream.prototype = Object.create(DecodeStream.prototype);
@ -25462,9 +25464,8 @@
} }
} }
// Fetching the 'ColorTransform' entry, if it exists. // Fetching the 'ColorTransform' entry, if it exists.
var decodeParams = this.dict.get('DecodeParms', 'DP'); if (isDict(this.params)) {
if (isDict(decodeParams)) { var colorTransform = this.params.get('ColorTransform');
var colorTransform = decodeParams.get('ColorTransform');
if (isInt(colorTransform)) { if (isInt(colorTransform)) {
jpegImage.colorTransform = colorTransform; jpegImage.colorTransform = colorTransform;
} }
@ -25489,10 +25490,11 @@
* the stream behaves like all the other DecodeStreams. * the stream behaves like all the other DecodeStreams.
*/ */
var JpxStream = function JpxStreamClosure() { var JpxStream = function JpxStreamClosure() {
function JpxStream(stream, maybeLength, dict) { function JpxStream(stream, maybeLength, dict, params) {
this.stream = stream; this.stream = stream;
this.maybeLength = maybeLength; this.maybeLength = maybeLength;
this.dict = dict; this.dict = dict;
this.params = params;
DecodeStream.call(this, maybeLength); DecodeStream.call(this, maybeLength);
} }
JpxStream.prototype = Object.create(DecodeStream.prototype); JpxStream.prototype = Object.create(DecodeStream.prototype);
@ -25547,10 +25549,11 @@
* the stream behaves like all the other DecodeStreams. * the stream behaves like all the other DecodeStreams.
*/ */
var Jbig2Stream = function Jbig2StreamClosure() { var Jbig2Stream = function Jbig2StreamClosure() {
function Jbig2Stream(stream, maybeLength, dict) { function Jbig2Stream(stream, maybeLength, dict, params) {
this.stream = stream; this.stream = stream;
this.maybeLength = maybeLength; this.maybeLength = maybeLength;
this.dict = dict; this.dict = dict;
this.params = params;
DecodeStream.call(this, maybeLength); DecodeStream.call(this, maybeLength);
} }
Jbig2Stream.prototype = Object.create(DecodeStream.prototype); Jbig2Stream.prototype = Object.create(DecodeStream.prototype);
@ -25567,23 +25570,16 @@
} }
var jbig2Image = new Jbig2Image(); var jbig2Image = new Jbig2Image();
var chunks = []; var chunks = [];
var decodeParams = this.dict.getArray('DecodeParms', 'DP'); if (isDict(this.params)) {
// According to the PDF specification, DecodeParms can be either var globalsStream = this.params.get('JBIG2Globals');
// a dictionary, or an array whose elements are dictionaries. if (isStream(globalsStream)) {
if (isArray(decodeParams)) { var globals = globalsStream.getBytes();
if (decodeParams.length > 1) { chunks.push({
warn('JBIG2 - \'DecodeParms\' array with multiple elements ' + 'not supported.'); data: globals,
} start: 0,
decodeParams = decodeParams[0]; end: globals.length
} });
if (decodeParams && decodeParams.has('JBIG2Globals')) { }
var globalsStream = decodeParams.get('JBIG2Globals');
var globals = globalsStream.getBytes();
chunks.push({
data: globals,
start: 0,
end: globals.length
});
} }
chunks.push({ chunks.push({
data: this.bytes, data: this.bytes,
@ -36306,6 +36302,9 @@
var filter = dict.get('Filter', 'F'); var filter = dict.get('Filter', 'F');
var params = dict.get('DecodeParms', 'DP'); var params = dict.get('DecodeParms', 'DP');
if (isName(filter)) { if (isName(filter)) {
if (isArray(params)) {
params = params[0];
}
return this.makeFilter(stream, filter.name, length, params); return this.makeFilter(stream, filter.name, length, params);
} }
var maybeLength = length; var maybeLength = length;
@ -36361,11 +36360,11 @@
} }
if (name === 'DCTDecode' || name === 'DCT') { if (name === 'DCTDecode' || name === 'DCT') {
xrefStreamStats[StreamType.DCT] = true; xrefStreamStats[StreamType.DCT] = true;
return new JpegStream(stream, maybeLength, stream.dict); return new JpegStream(stream, maybeLength, stream.dict, params);
} }
if (name === 'JPXDecode' || name === 'JPX') { if (name === 'JPXDecode' || name === 'JPX') {
xrefStreamStats[StreamType.JPX] = true; xrefStreamStats[StreamType.JPX] = true;
return new JpxStream(stream, maybeLength, stream.dict); return new JpxStream(stream, maybeLength, stream.dict, params);
} }
if (name === 'ASCII85Decode' || name === 'A85') { if (name === 'ASCII85Decode' || name === 'A85') {
xrefStreamStats[StreamType.A85] = true; xrefStreamStats[StreamType.A85] = true;
@ -36385,7 +36384,7 @@
} }
if (name === 'JBIG2Decode') { if (name === 'JBIG2Decode') {
xrefStreamStats[StreamType.JBIG] = true; xrefStreamStats[StreamType.JBIG] = true;
return new Jbig2Stream(stream, maybeLength, stream.dict); return new Jbig2Stream(stream, maybeLength, stream.dict, params);
} }
warn('filter "' + name + '" not supported yet'); warn('filter "' + name + '" not supported yet');
return stream; return stream;

2
package.json

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