mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Adds UMD headers to core, display and shared files.
This commit is contained in:
parent
1b5940edd2
commit
6b60c8f4db
54 changed files with 1876 additions and 572 deletions
|
@ -12,13 +12,48 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals PDFJS, Util, isDict, isName, stringToPDFString, warn, Dict, Stream,
|
||||
stringToBytes, Promise, isArray, ObjectLoader, OperatorList,
|
||||
isValidUrl, OPS, AnnotationType, stringToUTF8String,
|
||||
AnnotationBorderStyleType, ColorSpace, AnnotationFlag, isInt */
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/annotation', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/colorspace',
|
||||
'pdfjs/core/obj', 'pdfjs/core/evaluator'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'), require('./colorspace.js'), require('./obj.js'),
|
||||
require('./evaluator.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreAnnotation = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreColorSpace,
|
||||
root.pdfjsCoreObj, root.pdfjsCoreEvaluator);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream,
|
||||
coreColorSpace, coreObj, coreEvaluator) {
|
||||
|
||||
var AnnotationBorderStyleType = sharedUtil.AnnotationBorderStyleType;
|
||||
var AnnotationFlag = sharedUtil.AnnotationFlag;
|
||||
var AnnotationType = sharedUtil.AnnotationType;
|
||||
var OPS = sharedUtil.OPS;
|
||||
var Util = sharedUtil.Util;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var isValidUrl = sharedUtil.isValidUrl;
|
||||
var stringToBytes = sharedUtil.stringToBytes;
|
||||
var stringToPDFString = sharedUtil.stringToPDFString;
|
||||
var stringToUTF8String = sharedUtil.stringToUTF8String;
|
||||
var warn = sharedUtil.warn;
|
||||
var Dict = corePrimitives.Dict;
|
||||
var Name = corePrimitives.Name;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isName = corePrimitives.isName;
|
||||
var Stream = coreStream.Stream;
|
||||
var ColorSpace = coreColorSpace.ColorSpace;
|
||||
var ObjectLoader = coreObj.ObjectLoader;
|
||||
var OperatorList = coreEvaluator.OperatorList;
|
||||
|
||||
var DEFAULT_ICON_SIZE = 22; // px
|
||||
|
||||
/**
|
||||
|
@ -712,3 +747,8 @@ var LinkAnnotation = (function LinkAnnotationClosure() {
|
|||
|
||||
return LinkAnnotation;
|
||||
})();
|
||||
|
||||
exports.Annotation = Annotation;
|
||||
exports.AnnotationBorderStyle = AnnotationBorderStyle;
|
||||
exports.AnnotationFactory = AnnotationFactory;
|
||||
}));
|
||||
|
|
|
@ -15,6 +15,16 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/arithmetic_decoder', ['exports'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports);
|
||||
} else {
|
||||
factory((root.pdfjsCoreArithmeticDecoder = {}));
|
||||
}
|
||||
}(this, function (exports) {
|
||||
|
||||
/* This class implements the QM Coder decoding as defined in
|
||||
* JPEG 2000 Part I Final Committee Draft Version 1.0
|
||||
* Annex C.3 Arithmetic decoding procedure
|
||||
|
@ -181,3 +191,6 @@ var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
|
|||
|
||||
return ArithmeticDecoder;
|
||||
})();
|
||||
|
||||
exports.ArithmeticDecoder = ArithmeticDecoder;
|
||||
}));
|
||||
|
|
|
@ -12,10 +12,21 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/bidi', ['exports', 'pdfjs/shared/global'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/global.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreBidi = {}), root.pdfjsSharedGlobal);
|
||||
}
|
||||
}(this, function (exports, sharedGlobal) {
|
||||
|
||||
var PDFJS = sharedGlobal.PDFJS;
|
||||
|
||||
var bidi = PDFJS.bidi = (function bidiClosure() {
|
||||
// Character types for symbols from 0000 to 00FF.
|
||||
var baseTypes = [
|
||||
|
@ -421,3 +432,6 @@ var bidi = PDFJS.bidi = (function bidiClosure() {
|
|||
|
||||
return bidi;
|
||||
})();
|
||||
|
||||
exports.bidi = bidi;
|
||||
}));
|
||||
|
|
|
@ -15,6 +15,16 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/charsets', ['exports'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports);
|
||||
} else {
|
||||
factory((root.pdfjsCoreCharsets = {}));
|
||||
}
|
||||
}(this, function (exports) {
|
||||
|
||||
var ISOAdobeCharset = [
|
||||
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
|
||||
'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
|
||||
|
@ -114,3 +124,8 @@ var ExpertSubsetCharset = [
|
|||
'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
|
||||
'periodinferior', 'commainferior'
|
||||
];
|
||||
|
||||
exports.ISOAdobeCharset = ISOAdobeCharset;
|
||||
exports.ExpertCharset = ExpertCharset;
|
||||
exports.ExpertSubsetCharset = ExpertSubsetCharset;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,27 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals assert, MissingDataException, isInt, NetworkManager, Promise,
|
||||
isEmptyObj, createPromiseCapability */
|
||||
/* globals NetworkManager */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/chunked_stream', ['exports', 'pdfjs/shared/util'],
|
||||
factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreChunkedStream = {}), root.pdfjsSharedUtil);
|
||||
}
|
||||
}(this, function (exports, sharedUtil) {
|
||||
|
||||
var MissingDataException = sharedUtil.MissingDataException;
|
||||
var assert = sharedUtil.assert;
|
||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var isEmptyObj = sharedUtil.isEmptyObj;
|
||||
|
||||
var ChunkedStream = (function ChunkedStreamClosure() {
|
||||
function ChunkedStream(length, chunkSize, manager) {
|
||||
this.bytes = new Uint8Array(length);
|
||||
|
@ -545,3 +561,7 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
|||
|
||||
return ChunkedStreamManager;
|
||||
})();
|
||||
|
||||
exports.ChunkedStream = ChunkedStream;
|
||||
exports.ChunkedStreamManager = ChunkedStreamManager;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,37 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals Util, isString, isInt, warn, error, isCmd, isEOF, isName, Lexer,
|
||||
isStream, StringStream, PDFJS, assert */
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/cmap', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/parser'],
|
||||
factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'), require('./parser.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreCMap = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreParser);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream, coreParser) {
|
||||
|
||||
var Util = sharedUtil.Util;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var isString = sharedUtil.isString;
|
||||
var warn = sharedUtil.warn;
|
||||
var isName = corePrimitives.isName;
|
||||
var isCmd = corePrimitives.isCmd;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var StringStream = coreStream.StringStream;
|
||||
var Lexer = coreParser.Lexer;
|
||||
var isEOF = coreParser.isEOF;
|
||||
|
||||
var BUILT_IN_CMAPS = [
|
||||
// << Start unicode maps.
|
||||
'Adobe-GB1-UCS2',
|
||||
|
@ -992,3 +1018,8 @@ var CMapFactory = (function CMapFactoryClosure() {
|
|||
}
|
||||
};
|
||||
})();
|
||||
|
||||
exports.CMap = CMap;
|
||||
exports.CMapFactory = CMapFactory;
|
||||
exports.IdentityCMap = IdentityCMap;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,38 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals error, info, isArray, isDict, isName, isStream, isString,
|
||||
PDFFunction, PDFImage, shadow, warn */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/colorspace', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/function', 'pdfjs/core/stream'],
|
||||
factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./function.js'), require('./stream.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreColorSpace = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreFunction, root.pdfjsCoreStream);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreFunction,
|
||||
coreStream) {
|
||||
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isString = sharedUtil.isString;
|
||||
var shadow = sharedUtil.shadow;
|
||||
var warn = sharedUtil.warn;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isName = corePrimitives.isName;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var PDFFunction = coreFunction.PDFFunction;
|
||||
|
||||
var coreImage; // see _setCoreImage below
|
||||
var PDFImage; // = coreImage.PDFImage;
|
||||
|
||||
var ColorSpace = (function ColorSpaceClosure() {
|
||||
// Constructor should define this.numComps, this.defaultColor, this.name
|
||||
function ColorSpace() {
|
||||
|
@ -1253,3 +1280,16 @@ var LabCS = (function LabCSClosure() {
|
|||
};
|
||||
return LabCS;
|
||||
})();
|
||||
|
||||
// TODO refactor to remove dependency on image.js
|
||||
function _setCoreImage(coreImage_) {
|
||||
coreImage = coreImage_;
|
||||
PDFImage = coreImage_.PDFImage;
|
||||
}
|
||||
exports._setCoreImage = _setCoreImage;
|
||||
|
||||
exports.ColorSpace = ColorSpace;
|
||||
|
||||
// TODO refactor to remove dependency on colorspace.js
|
||||
coreStream._setCoreColorSpace(exports);
|
||||
}));
|
||||
|
|
|
@ -12,12 +12,34 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals bytesToString, DecryptStream, error, isInt, isName, Name,
|
||||
PasswordException, PasswordResponses, stringToBytes, warn,
|
||||
utf8StringToString */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/crypto', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreCrypto = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream) {
|
||||
|
||||
var PasswordException = sharedUtil.PasswordException;
|
||||
var PasswordResponses = sharedUtil.PasswordResponses;
|
||||
var bytesToString = sharedUtil.bytesToString;
|
||||
var error = sharedUtil.error;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var stringToBytes = sharedUtil.stringToBytes;
|
||||
var utf8StringToString = sharedUtil.utf8StringToString;
|
||||
var warn = sharedUtil.warn;
|
||||
var Name = corePrimitives.Name;
|
||||
var isName = corePrimitives.isName;
|
||||
var DecryptStream = coreStream.DecryptStream;
|
||||
|
||||
var ARCFourCipher = (function ARCFourCipherClosure() {
|
||||
function ARCFourCipher(key) {
|
||||
this.a = 0;
|
||||
|
@ -2049,3 +2071,15 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
|||
|
||||
return CipherTransformFactory;
|
||||
})();
|
||||
|
||||
exports.AES128Cipher = AES128Cipher;
|
||||
exports.AES256Cipher = AES256Cipher;
|
||||
exports.ARCFourCipher = ARCFourCipher;
|
||||
exports.CipherTransformFactory = CipherTransformFactory;
|
||||
exports.PDF17 = PDF17;
|
||||
exports.PDF20 = PDF20;
|
||||
exports.calculateMD5 = calculateMD5;
|
||||
exports.calculateSHA256 = calculateSHA256;
|
||||
exports.calculateSHA384 = calculateSHA384;
|
||||
exports.calculateSHA512 = calculateSHA512;
|
||||
}));
|
||||
|
|
|
@ -12,15 +12,59 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals warn, Dict, isDict, shadow, isArray, Util, StreamsSequenceStream,
|
||||
isStream, NullStream, ObjectLoader, PartialEvaluator, Promise,
|
||||
OperatorList, Annotation, error, assert, XRef, isArrayBuffer, Stream,
|
||||
isString, isName, info, Linearization, MissingDataException, Lexer,
|
||||
Catalog, stringToPDFString, stringToBytes, calculateMD5,
|
||||
AnnotationFactory */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/document', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/obj',
|
||||
'pdfjs/core/parser', 'pdfjs/core/crypto', 'pdfjs/core/evaluator',
|
||||
'pdfjs/core/annotation'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'), require('./obj.js'), require('./parser.js'),
|
||||
require('./crypto.js'), require('./evaluator.js'),
|
||||
require('./annotation.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreDocument = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream,
|
||||
root.pdfjsCoreObj, root.pdfjsCoreParser, root.pdfjsCoreCrypto,
|
||||
root.pdfjsCoreEvaluator, root.pdfjsCoreAnnotation);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream, coreObj,
|
||||
coreParser, coreCrypto, coreEvaluator, coreAnnotation) {
|
||||
|
||||
var MissingDataException = sharedUtil.MissingDataException;
|
||||
var Util = sharedUtil.Util;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isArrayBuffer = sharedUtil.isArrayBuffer;
|
||||
var isString = sharedUtil.isString;
|
||||
var shadow = sharedUtil.shadow;
|
||||
var stringToBytes = sharedUtil.stringToBytes;
|
||||
var stringToPDFString = sharedUtil.stringToPDFString;
|
||||
var warn = sharedUtil.warn;
|
||||
var Dict = corePrimitives.Dict;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isName = corePrimitives.isName;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var NullStream = coreStream.NullStream;
|
||||
var Stream = coreStream.Stream;
|
||||
var StreamsSequenceStream = coreStream.StreamsSequenceStream;
|
||||
var Catalog = coreObj.Catalog;
|
||||
var ObjectLoader = coreObj.ObjectLoader;
|
||||
var XRef = coreObj.XRef;
|
||||
var Lexer = coreParser.Lexer;
|
||||
var Linearization = coreParser.Linearization;
|
||||
var calculateMD5 = coreCrypto.calculateMD5;
|
||||
var OperatorList = coreEvaluator.OperatorList;
|
||||
var PartialEvaluator = coreEvaluator.PartialEvaluator;
|
||||
var Annotation = coreAnnotation.Annotation;
|
||||
var AnnotationFactory = coreAnnotation.AnnotationFactory;
|
||||
|
||||
var Page = (function PageClosure() {
|
||||
|
||||
var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];
|
||||
|
@ -478,7 +522,14 @@ var PDFDocument = (function PDFDocumentClosure() {
|
|||
},
|
||||
setup: function PDFDocument_setup(recoveryMode) {
|
||||
this.xref.parse(recoveryMode);
|
||||
this.catalog = new Catalog(this.pdfManager, this.xref);
|
||||
var self = this;
|
||||
var pageFactory = {
|
||||
createPage: function (pageIndex, dict, ref, fontCache) {
|
||||
return new Page(self.pdfManager, self.xref, pageIndex, dict, ref,
|
||||
fontCache);
|
||||
}
|
||||
};
|
||||
this.catalog = new Catalog(this.pdfManager, this.xref, pageFactory);
|
||||
},
|
||||
get numPages() {
|
||||
var linearization = this.linearization;
|
||||
|
@ -551,3 +602,7 @@ var PDFDocument = (function PDFDocumentClosure() {
|
|||
|
||||
return PDFDocument;
|
||||
})();
|
||||
|
||||
exports.Page = Page;
|
||||
exports.PDFDocument = PDFDocument;
|
||||
}));
|
|
@ -12,19 +12,85 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals assert, CMapFactory, ColorSpace, DecodeStream, Dict, Encodings,
|
||||
error, ErrorFont, Font, FONT_IDENTITY_MATRIX, fontCharsToUnicode,
|
||||
FontFlags, ImageKind, info, isArray, isCmd, isDict, isEOF, isName,
|
||||
isNum, isStream, isString, JpegStream, Lexer, Metrics, IdentityCMap,
|
||||
MurmurHash3_64, Name, Parser, Pattern, PDFImage, PDFJS, serifFonts,
|
||||
stdFontMap, symbolsFonts, getTilingPatternIR, warn, Util, Promise,
|
||||
RefSetCache, isRef, TextRenderingMode, IdentityToUnicodeMap,
|
||||
OPS, UNSUPPORTED_FEATURES, NormalizedUnicodes, IDENTITY_MATRIX,
|
||||
reverseIfRtl, createPromiseCapability, ToUnicodeMap, getFontType,
|
||||
isPDFFunction, PDFFunction */
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/evaluator', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/parser',
|
||||
'pdfjs/core/image', 'pdfjs/core/colorspace', 'pdfjs/core/murmurhash3',
|
||||
'pdfjs/core/fonts', 'pdfjs/core/function', 'pdfjs/core/pattern',
|
||||
'pdfjs/core/cmap', 'pdfjs/core/metrics', 'pdfjs/core/bidi'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'), require('./parser.js'), require('./image.js'),
|
||||
require('./colorspace.js'), require('./murmurhash3.js'),
|
||||
require('./fonts.js'), require('./function.js'), require('./pattern.js'),
|
||||
require('./cmap.js'), require('./metrics.js'), require('./bidi.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreEvaluator = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreParser,
|
||||
root.pdfjsCoreImage, root.pdfjsCoreColorSpace, root.pdfjsCoreMurmurHash3,
|
||||
root.pdfjsCoreFonts, root.pdfjsCoreFunction, root.pdfjsCorePattern,
|
||||
root.pdfjsCoreCMap, root.pdfjsCoreMetrics, root.pdfjsCoreBidi);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream, coreParser,
|
||||
coreImage, coreColorSpace, coreMurmurHash3, coreFonts,
|
||||
coreFunction, corePattern, coreCMap, coreMetrics, coreBidi) {
|
||||
|
||||
var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX;
|
||||
var IDENTITY_MATRIX = sharedUtil.IDENTITY_MATRIX;
|
||||
var UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES;
|
||||
var ImageKind = sharedUtil.ImageKind;
|
||||
var OPS = sharedUtil.OPS;
|
||||
var TextRenderingMode = sharedUtil.TextRenderingMode;
|
||||
var Util = sharedUtil.Util;
|
||||
var assert = sharedUtil.assert;
|
||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isNum = sharedUtil.isNum;
|
||||
var isString = sharedUtil.isString;
|
||||
var warn = sharedUtil.warn;
|
||||
var Dict = corePrimitives.Dict;
|
||||
var Name = corePrimitives.Name;
|
||||
var isCmd = corePrimitives.isCmd;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isName = corePrimitives.isName;
|
||||
var isRef = corePrimitives.isRef;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var DecodeStream = coreStream.DecodeStream;
|
||||
var JpegStream = coreStream.JpegStream;
|
||||
var Lexer = coreParser.Lexer;
|
||||
var Parser = coreParser.Parser;
|
||||
var isEOF = coreParser.isEOF;
|
||||
var PDFImage = coreImage.PDFImage;
|
||||
var ColorSpace = coreColorSpace.ColorSpace;
|
||||
var MurmurHash3_64 = coreMurmurHash3.MurmurHash3_64;
|
||||
var Encodings = coreFonts.Encodings;
|
||||
var ErrorFont = coreFonts.ErrorFont;
|
||||
var FontFlags = coreFonts.FontFlags;
|
||||
var Font = coreFonts.Font;
|
||||
var IdentityToUnicodeMap = coreFonts.IdentityToUnicodeMap;
|
||||
var NormalizedUnicodes = coreFonts.NormalizedUnicodes;
|
||||
var ToUnicodeMap = coreFonts.ToUnicodeMap;
|
||||
var getFontType = coreFonts.getFontType;
|
||||
var reverseIfRtl = coreFonts.reverseIfRtl;
|
||||
var serifFonts = coreFonts.serifFonts;
|
||||
var symbolsFonts = coreFonts.symbolsFonts;
|
||||
var stdFontMap = coreFonts.stdFontMap;
|
||||
var isPDFFunction = coreFunction.isPDFFunction;
|
||||
var PDFFunction = coreFunction.PDFFunction;
|
||||
var Pattern = corePattern.Pattern;
|
||||
var getTilingPatternIR = corePattern.getTilingPatternIR;
|
||||
var CMapFactory = coreCMap.CMapFactory;
|
||||
var IdentityCMap = coreCMap.IdentityCMap;
|
||||
var Metrics = coreMetrics.Metrics;
|
||||
var bidi = coreBidi.bidi;
|
||||
|
||||
var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
function PartialEvaluator(pdfManager, xref, handler, pageIndex,
|
||||
uniquePrefix, idCounters, fontCache) {
|
||||
|
@ -2889,3 +2955,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
|
|||
};
|
||||
return QueueOptimizer;
|
||||
})();
|
||||
|
||||
exports.OperatorList = OperatorList;
|
||||
exports.PartialEvaluator = PartialEvaluator;
|
||||
}));
|
||||
|
|
|
@ -12,10 +12,30 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals error, bytesToString, Stream, GlyphsUnicode, CFFParser, Encodings,
|
||||
Util */
|
||||
|
||||
'use strict';
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/font_renderer', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/stream', 'pdfjs/core/glyphlist'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./stream.js'),
|
||||
require('./glyphlist.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreFontRenderer = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCoreStream, root.pdfjsCoreGlyphList);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, coreStream, coreGlyphList) {
|
||||
|
||||
var Util = sharedUtil.Util;
|
||||
var bytesToString = sharedUtil.bytesToString;
|
||||
var error = sharedUtil.error;
|
||||
var Stream = coreStream.Stream;
|
||||
var GlyphsUnicode = coreGlyphList.GlyphsUnicode;
|
||||
|
||||
var coreFonts; // see _setCoreFonts below
|
||||
var CFFParser; // = coreFonts.CFFParser;
|
||||
var Encodings; // = coreFonts.Encodings;
|
||||
|
||||
var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
function getLong(data, offset) {
|
||||
|
@ -706,3 +726,15 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
}
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
// TODO refactor to remove cyclic dependency on fonts.js
|
||||
function _setCoreFonts(coreFonts_) {
|
||||
coreFonts = coreFonts_;
|
||||
Encodings = coreFonts_.Encodings;
|
||||
CFFParser = coreFonts_.CFFParser;
|
||||
}
|
||||
exports._setCoreFonts = _setCoreFonts;
|
||||
|
||||
exports.FontRendererFactory = FontRendererFactory;
|
||||
}));
|
||||
|
|
|
@ -12,14 +12,57 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals FONT_IDENTITY_MATRIX, FontType, warn, GlyphsUnicode, error, string32,
|
||||
readUint32, Stream, FontRendererFactory, shadow, stringToBytes,
|
||||
bytesToString, info, assert, IdentityCMap, Name, CMapFactory, PDFJS,
|
||||
isNum, Lexer, isArray, ISOAdobeCharset, ExpertCharset, isInt,
|
||||
ExpertSubsetCharset, Util, DingbatsGlyphsUnicode */
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/fonts', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/parser',
|
||||
'pdfjs/core/cmap', 'pdfjs/core/glyphlist', 'pdfjs/core/charsets',
|
||||
'pdfjs/core/font_renderer'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'), require('./parser.js'), require('./cmap.js'),
|
||||
require('./glyphlist.js'), require('./charsets.js'),
|
||||
require('./font_renderer.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreFonts = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreParser,
|
||||
root.pdfjsCoreCMap, root.pdfjsCoreGlyphList, root.pdfjsCoreCharsets,
|
||||
root.pdfjsCoreFontRenderer);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream, coreParser,
|
||||
coreCMap, coreGlyphList, coreCharsets, coreFontRenderer) {
|
||||
|
||||
var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX;
|
||||
var FontType = sharedUtil.FontType;
|
||||
var Util = sharedUtil.Util;
|
||||
var assert = sharedUtil.assert;
|
||||
var bytesToString = sharedUtil.bytesToString;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var isNum = sharedUtil.isNum;
|
||||
var readUint32 = sharedUtil.readUint32;
|
||||
var shadow = sharedUtil.shadow;
|
||||
var stringToBytes = sharedUtil.stringToBytes;
|
||||
var string32 = sharedUtil.string32;
|
||||
var warn = sharedUtil.warn;
|
||||
var Name = corePrimitives.Name;
|
||||
var Stream = coreStream.Stream;
|
||||
var Lexer = coreParser.Lexer;
|
||||
var CMapFactory = coreCMap.CMapFactory;
|
||||
var IdentityCMap = coreCMap.IdentityCMap;
|
||||
var GlyphsUnicode = coreGlyphList.GlyphsUnicode;
|
||||
var DingbatsGlyphsUnicode = coreGlyphList.DingbatsGlyphsUnicode;
|
||||
var ISOAdobeCharset = coreCharsets.ISOAdobeCharset;
|
||||
var ExpertCharset = coreCharsets.ExpertCharset;
|
||||
var ExpertSubsetCharset = coreCharsets.ExpertSubsetCharset;
|
||||
var FontRendererFactory = coreFontRenderer.FontRendererFactory;
|
||||
|
||||
// Unicode Private Use Area
|
||||
var PRIVATE_USE_OFFSET_START = 0xE000;
|
||||
var PRIVATE_USE_OFFSET_END = 0xF8FF;
|
||||
|
@ -7354,9 +7397,13 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
|||
return CFFCompiler;
|
||||
})();
|
||||
|
||||
function _enableSeacAnalysis(enabled) {
|
||||
exports.SEAC_ANALYSIS_ENABLED = SEAC_ANALYSIS_ENABLED = enabled;
|
||||
}
|
||||
|
||||
// Workaround for seac on Windows.
|
||||
(function checkSeacSupport() {
|
||||
if (/Windows/.test(navigator.userAgent)) {
|
||||
if (typeof navigator !== 'undefined' && /Windows/.test(navigator.userAgent)) {
|
||||
SEAC_ANALYSIS_ENABLED = true;
|
||||
}
|
||||
})();
|
||||
|
@ -7365,7 +7412,32 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
|||
// http://code.google.com/p/chromium/issues/detail?id=122465
|
||||
// https://github.com/mozilla/pdf.js/issues/1689
|
||||
(function checkChromeWindows() {
|
||||
if (/Windows.*Chrome/.test(navigator.userAgent)) {
|
||||
if (typeof navigator !== 'undefined' &&
|
||||
/Windows.*Chrome/.test(navigator.userAgent)) {
|
||||
SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = true;
|
||||
}
|
||||
})();
|
||||
|
||||
exports.SEAC_ANALYSIS_ENABLED = SEAC_ANALYSIS_ENABLED;
|
||||
exports.CFFCompiler = CFFCompiler;
|
||||
exports.CFFIndex = CFFIndex;
|
||||
exports.CFFParser = CFFParser;
|
||||
exports.CFFStrings = CFFStrings;
|
||||
exports.Encodings = Encodings;
|
||||
exports.ErrorFont = ErrorFont;
|
||||
exports.FontFlags = FontFlags;
|
||||
exports.Font = Font;
|
||||
exports.IdentityToUnicodeMap = IdentityToUnicodeMap;
|
||||
exports.NormalizedUnicodes = NormalizedUnicodes;
|
||||
exports.ToUnicodeMap = ToUnicodeMap;
|
||||
exports.Type1Parser = Type1Parser;
|
||||
exports.getFontType = getFontType;
|
||||
exports.reverseIfRtl = reverseIfRtl;
|
||||
exports.serifFonts = serifFonts;
|
||||
exports.symbolsFonts = symbolsFonts;
|
||||
exports.stdFontMap = stdFontMap;
|
||||
exports._enableSeacAnalysis = _enableSeacAnalysis;
|
||||
|
||||
// TODO refactor to remove cyclic dependency on font_renderer.js
|
||||
coreFontRenderer._setCoreFonts(exports);
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,31 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals PostScriptLexer, PostScriptParser, error, info, isArray, isBool,
|
||||
isDict, isStream */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/function', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/ps_parser'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./ps_parser.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreFunction = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCorePsParser);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, corePsParser) {
|
||||
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isBool = sharedUtil.isBool;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var PostScriptLexer = corePsParser.PostScriptLexer;
|
||||
var PostScriptParser = corePsParser.PostScriptParser;
|
||||
|
||||
var PDFFunction = (function PDFFunctionClosure() {
|
||||
var CONSTRUCT_SAMPLED = 0;
|
||||
var CONSTRUCT_INTERPOLATED = 2;
|
||||
|
@ -1131,3 +1151,9 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|||
|
||||
return PostScriptCompiler;
|
||||
})();
|
||||
|
||||
exports.isPDFFunction = isPDFFunction;
|
||||
exports.PDFFunction = PDFFunction;
|
||||
exports.PostScriptEvaluator = PostScriptEvaluator;
|
||||
exports.PostScriptCompiler = PostScriptCompiler;
|
||||
}));
|
||||
|
|
|
@ -15,6 +15,16 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/glyphlist', ['exports'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports);
|
||||
} else {
|
||||
factory((root.pdfjsCoreGlyphList = {}));
|
||||
}
|
||||
}(this, function (exports) {
|
||||
|
||||
var GlyphsUnicode = {
|
||||
A: 0x0041,
|
||||
AE: 0x00C6,
|
||||
|
@ -4427,3 +4437,7 @@ var DingbatsGlyphsUnicode = {
|
|||
a96: 0x2775, // 0xF8E4
|
||||
'.notdef': 0x0000
|
||||
};
|
||||
|
||||
exports.GlyphsUnicode = GlyphsUnicode;
|
||||
exports.DingbatsGlyphsUnicode = DingbatsGlyphsUnicode;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,40 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals assert, ColorSpace, DecodeStream, error, info, isArray, ImageKind,
|
||||
isStream, JpegStream, JpxImage, Name, Promise, Stream, warn */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/image', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/colorspace', 'pdfjs/core/stream',
|
||||
'pdfjs/core/jpx'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./colorspace.js'), require('./stream.js'),
|
||||
require('./jpx.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreImage = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreColorSpace, root.pdfjsCoreStream,
|
||||
root.pdfjsCoreJpx);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreColorSpace,
|
||||
coreStream, coreJpx) {
|
||||
|
||||
var ImageKind = sharedUtil.ImageKind;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var warn = sharedUtil.warn;
|
||||
var Name = corePrimitives.Name;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var ColorSpace = coreColorSpace.ColorSpace;
|
||||
var DecodeStream = coreStream.DecodeStream;
|
||||
var Stream = coreStream.Stream;
|
||||
var JpegStream = coreStream.JpegStream;
|
||||
var JpxImage = coreJpx.JpxImage;
|
||||
|
||||
var PDFImage = (function PDFImageClosure() {
|
||||
/**
|
||||
* Decode the image in the main thread if it supported. Resovles the promise
|
||||
|
@ -672,3 +701,9 @@ var PDFImage = (function PDFImageClosure() {
|
|||
};
|
||||
return PDFImage;
|
||||
})();
|
||||
|
||||
exports.PDFImage = PDFImage;
|
||||
|
||||
// TODO refactor to remove dependency on colorspace.js
|
||||
coreColorSpace._setCoreImage(exports);
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,30 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals ArithmeticDecoder, error, log2, readInt8, readUint16, readUint32,
|
||||
shadow */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/jbig2', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/arithmetic_decoder'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'),
|
||||
require('./arithmetic_decoder.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreJbig2 = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCoreArithmeticDecoder);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, coreArithmeticDecoder) {
|
||||
|
||||
var error = sharedUtil.error;
|
||||
var log2 = sharedUtil.log2;
|
||||
var readInt8 = sharedUtil.readInt8;
|
||||
var readUint16 = sharedUtil.readUint16;
|
||||
var readUint32 = sharedUtil.readUint32;
|
||||
var shadow = sharedUtil.shadow;
|
||||
var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder;
|
||||
|
||||
var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
// Utility data structures
|
||||
function ContextCache() {}
|
||||
|
@ -1084,3 +1103,6 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
|||
|
||||
return Jbig2Image;
|
||||
})();
|
||||
|
||||
exports.Jbig2Image = Jbig2Image;
|
||||
}));
|
||||
|
|
|
@ -14,6 +14,18 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/jpg', ['exports'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports);
|
||||
} else {
|
||||
factory((root.pdfjsCoreJpg = {}));
|
||||
}
|
||||
}(this, function (exports) {
|
||||
|
||||
/*
|
||||
This code was forked from https://github.com/notmasteryet/jpgjs. The original
|
||||
version was created by github user notmasteryet
|
||||
|
@ -27,8 +39,6 @@ version was created by github user notmasteryet
|
|||
(partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var JpegImage = (function jpegImage() {
|
||||
var dctZigZag = new Uint8Array([
|
||||
0,
|
||||
|
@ -1033,3 +1043,6 @@ var JpegImage = (function jpegImage() {
|
|||
|
||||
return constructor;
|
||||
})();
|
||||
|
||||
exports.JpegImage = JpegImage;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,29 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals ArithmeticDecoder, globalScope, log2, readUint16, readUint32,
|
||||
info, warn */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/jpx', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/arithmetic_decoder'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'),
|
||||
require('./arithmetic_decoder.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreJpx = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCoreArithmeticDecoder);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, coreArithmeticDecoder) {
|
||||
|
||||
var info = sharedUtil.info;
|
||||
var log2 = sharedUtil.log2;
|
||||
var readUint16 = sharedUtil.readUint16;
|
||||
var readUint32 = sharedUtil.readUint32;
|
||||
var warn = sharedUtil.warn;
|
||||
var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder;
|
||||
|
||||
var JpxImage = (function JpxImageClosure() {
|
||||
// Table E.1
|
||||
var SubbandsGainLog2 = {
|
||||
|
@ -2211,3 +2229,6 @@ var JpxImage = (function JpxImageClosure() {
|
|||
|
||||
return JpxImage;
|
||||
})();
|
||||
|
||||
exports.JpxImage = JpxImage;
|
||||
}));
|
||||
|
|
|
@ -15,6 +15,16 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/metrics', ['exports'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports);
|
||||
} else {
|
||||
factory((root.pdfjsCoreMetrics = {}));
|
||||
}
|
||||
}(this, function (exports) {
|
||||
|
||||
// The Metrics object contains glyph widths (in glyph space units).
|
||||
// As per PDF spec, for most fonts (Type 3 being an exception) a glyph
|
||||
// space unit corresponds to 1/1000th of text space unit.
|
||||
|
@ -2956,3 +2966,6 @@ var Metrics = {
|
|||
'a191': 918
|
||||
}
|
||||
};
|
||||
|
||||
exports.Metrics = Metrics;
|
||||
}));
|
||||
|
|
|
@ -17,10 +17,21 @@
|
|||
* Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.
|
||||
* Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
|
||||
*/
|
||||
/* globals Uint32ArrayView */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/murmurhash3', ['exports', 'pdfjs/shared/util'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreMurmurHash3 = {}), root.pdfjsSharedUtil);
|
||||
}
|
||||
}(this, function (exports, sharedUtil) {
|
||||
|
||||
var Uint32ArrayView = sharedUtil.Uint32ArrayView;
|
||||
|
||||
var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
|
||||
// Workaround for missing math precison in JS.
|
||||
var MASK_HIGH = 0xffff0000;
|
||||
|
@ -162,3 +173,6 @@ var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
|
|||
|
||||
return MurmurHash3_64;
|
||||
})();
|
||||
|
||||
exports.MurmurHash3_64 = MurmurHash3_64;
|
||||
}));
|
||||
|
|
367
src/core/obj.js
367
src/core/obj.js
|
@ -12,326 +12,56 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals assert, bytesToString, CipherTransformFactory, error, info,
|
||||
InvalidPDFException, isArray, isCmd, isDict, isInt, isName, isRef,
|
||||
isStream, Lexer, Page, Parser, Promise, shadow,
|
||||
stringToPDFString, stringToUTF8String, warn, isString,
|
||||
Promise, MissingDataException, XRefParseException, Stream,
|
||||
ChunkedStream, createPromiseCapability */
|
||||
|
||||
'use strict';
|
||||
|
||||
var Name = (function NameClosure() {
|
||||
function Name(name) {
|
||||
this.name = name;
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/obj', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/crypto', 'pdfjs/core/parser',
|
||||
'pdfjs/core/chunked_stream'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./crypto.js'), require('./parser.js'),
|
||||
require('./chunked_stream.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreObj = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreCrypto, root.pdfjsCoreParser,
|
||||
root.pdfjsCoreChunkedStream);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreCrypto, coreParser,
|
||||
coreChunkedStream) {
|
||||
|
||||
Name.prototype = {};
|
||||
|
||||
var nameCache = {};
|
||||
|
||||
Name.get = function Name_get(name) {
|
||||
var nameValue = nameCache[name];
|
||||
return (nameValue ? nameValue : (nameCache[name] = new Name(name)));
|
||||
};
|
||||
|
||||
return Name;
|
||||
})();
|
||||
|
||||
var Cmd = (function CmdClosure() {
|
||||
function Cmd(cmd) {
|
||||
this.cmd = cmd;
|
||||
}
|
||||
|
||||
Cmd.prototype = {};
|
||||
|
||||
var cmdCache = {};
|
||||
|
||||
Cmd.get = function Cmd_get(cmd) {
|
||||
var cmdValue = cmdCache[cmd];
|
||||
return (cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd)));
|
||||
};
|
||||
|
||||
return Cmd;
|
||||
})();
|
||||
|
||||
var Dict = (function DictClosure() {
|
||||
var nonSerializable = function nonSerializableClosure() {
|
||||
return nonSerializable; // creating closure on some variable
|
||||
};
|
||||
|
||||
var GETALL_DICTIONARY_TYPES_WHITELIST = {
|
||||
'Background': true,
|
||||
'ExtGState': true,
|
||||
'Halftone': true,
|
||||
'Layout': true,
|
||||
'Mask': true,
|
||||
'Pagination': true,
|
||||
'Printing': true
|
||||
};
|
||||
|
||||
function isRecursionAllowedFor(dict) {
|
||||
if (!isName(dict.Type)) {
|
||||
return true;
|
||||
}
|
||||
var dictType = dict.Type.name;
|
||||
return GETALL_DICTIONARY_TYPES_WHITELIST[dictType] === true;
|
||||
}
|
||||
|
||||
// xref is optional
|
||||
function Dict(xref) {
|
||||
// Map should only be used internally, use functions below to access.
|
||||
this.map = Object.create(null);
|
||||
this.xref = xref;
|
||||
this.objId = null;
|
||||
this.__nonSerializable__ = nonSerializable; // disable cloning of the Dict
|
||||
}
|
||||
|
||||
Dict.prototype = {
|
||||
assignXref: function Dict_assignXref(newXref) {
|
||||
this.xref = newXref;
|
||||
},
|
||||
|
||||
// automatically dereferences Ref objects
|
||||
get: function Dict_get(key1, key2, key3) {
|
||||
var value;
|
||||
var xref = this.xref;
|
||||
if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
|
||||
typeof key2 === 'undefined') {
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
}
|
||||
if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
|
||||
typeof key3 === 'undefined') {
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
}
|
||||
value = this.map[key3] || null;
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
},
|
||||
|
||||
// Same as get(), but returns a promise and uses fetchIfRefAsync().
|
||||
getAsync: function Dict_getAsync(key1, key2, key3) {
|
||||
var value;
|
||||
var xref = this.xref;
|
||||
if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
|
||||
typeof key2 === 'undefined') {
|
||||
if (xref) {
|
||||
return xref.fetchIfRefAsync(value);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
}
|
||||
if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
|
||||
typeof key3 === 'undefined') {
|
||||
if (xref) {
|
||||
return xref.fetchIfRefAsync(value);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
}
|
||||
value = this.map[key3] || null;
|
||||
if (xref) {
|
||||
return xref.fetchIfRefAsync(value);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
},
|
||||
|
||||
// Same as get(), but dereferences all elements if the result is an Array.
|
||||
getArray: function Dict_getArray(key1, key2, key3) {
|
||||
var value = this.get(key1, key2, key3);
|
||||
var xref = this.xref;
|
||||
if (!isArray(value) || !xref) {
|
||||
return value;
|
||||
}
|
||||
value = value.slice(); // Ensure that we don't modify the Dict data.
|
||||
for (var i = 0, ii = value.length; i < ii; i++) {
|
||||
if (!isRef(value[i])) {
|
||||
continue;
|
||||
}
|
||||
value[i] = xref.fetch(value[i]);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
||||
// no dereferencing
|
||||
getRaw: function Dict_getRaw(key) {
|
||||
return this.map[key];
|
||||
},
|
||||
|
||||
// creates new map and dereferences all Refs
|
||||
getAll: function Dict_getAll() {
|
||||
var all = Object.create(null);
|
||||
var queue = null;
|
||||
var key, obj;
|
||||
for (key in this.map) {
|
||||
obj = this.get(key);
|
||||
if (obj instanceof Dict) {
|
||||
if (isRecursionAllowedFor(obj)) {
|
||||
(queue || (queue = [])).push({target: all, key: key, obj: obj});
|
||||
} else {
|
||||
all[key] = this.getRaw(key);
|
||||
}
|
||||
} else {
|
||||
all[key] = obj;
|
||||
}
|
||||
}
|
||||
if (!queue) {
|
||||
return all;
|
||||
}
|
||||
|
||||
// trying to take cyclic references into the account
|
||||
var processed = Object.create(null);
|
||||
while (queue.length > 0) {
|
||||
var item = queue.shift();
|
||||
var itemObj = item.obj;
|
||||
var objId = itemObj.objId;
|
||||
if (objId && objId in processed) {
|
||||
item.target[item.key] = processed[objId];
|
||||
continue;
|
||||
}
|
||||
var dereferenced = Object.create(null);
|
||||
for (key in itemObj.map) {
|
||||
obj = itemObj.get(key);
|
||||
if (obj instanceof Dict) {
|
||||
if (isRecursionAllowedFor(obj)) {
|
||||
queue.push({target: dereferenced, key: key, obj: obj});
|
||||
} else {
|
||||
dereferenced[key] = itemObj.getRaw(key);
|
||||
}
|
||||
} else {
|
||||
dereferenced[key] = obj;
|
||||
}
|
||||
}
|
||||
if (objId) {
|
||||
processed[objId] = dereferenced;
|
||||
}
|
||||
item.target[item.key] = dereferenced;
|
||||
}
|
||||
return all;
|
||||
},
|
||||
|
||||
getKeys: function Dict_getKeys() {
|
||||
return Object.keys(this.map);
|
||||
},
|
||||
|
||||
set: function Dict_set(key, value) {
|
||||
this.map[key] = value;
|
||||
},
|
||||
|
||||
has: function Dict_has(key) {
|
||||
return key in this.map;
|
||||
},
|
||||
|
||||
forEach: function Dict_forEach(callback) {
|
||||
for (var key in this.map) {
|
||||
callback(key, this.get(key));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Dict.empty = new Dict(null);
|
||||
|
||||
Dict.merge = function Dict_merge(xref, dictArray) {
|
||||
var mergedDict = new Dict(xref);
|
||||
|
||||
for (var i = 0, ii = dictArray.length; i < ii; i++) {
|
||||
var dict = dictArray[i];
|
||||
if (!isDict(dict)) {
|
||||
continue;
|
||||
}
|
||||
for (var keyName in dict.map) {
|
||||
if (mergedDict.map[keyName]) {
|
||||
continue;
|
||||
}
|
||||
mergedDict.map[keyName] = dict.map[keyName];
|
||||
}
|
||||
}
|
||||
return mergedDict;
|
||||
};
|
||||
|
||||
return Dict;
|
||||
})();
|
||||
|
||||
var Ref = (function RefClosure() {
|
||||
function Ref(num, gen) {
|
||||
this.num = num;
|
||||
this.gen = gen;
|
||||
}
|
||||
|
||||
Ref.prototype = {
|
||||
toString: function Ref_toString() {
|
||||
// This function is hot, so we make the string as compact as possible.
|
||||
// |this.gen| is almost always zero, so we treat that case specially.
|
||||
var str = this.num + 'R';
|
||||
if (this.gen !== 0) {
|
||||
str += this.gen;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
return Ref;
|
||||
})();
|
||||
|
||||
// The reference is identified by number and generation.
|
||||
// This structure stores only one instance of the reference.
|
||||
var RefSet = (function RefSetClosure() {
|
||||
function RefSet() {
|
||||
this.dict = {};
|
||||
}
|
||||
|
||||
RefSet.prototype = {
|
||||
has: function RefSet_has(ref) {
|
||||
return ref.toString() in this.dict;
|
||||
},
|
||||
|
||||
put: function RefSet_put(ref) {
|
||||
this.dict[ref.toString()] = true;
|
||||
},
|
||||
|
||||
remove: function RefSet_remove(ref) {
|
||||
delete this.dict[ref.toString()];
|
||||
}
|
||||
};
|
||||
|
||||
return RefSet;
|
||||
})();
|
||||
|
||||
var RefSetCache = (function RefSetCacheClosure() {
|
||||
function RefSetCache() {
|
||||
this.dict = Object.create(null);
|
||||
}
|
||||
|
||||
RefSetCache.prototype = {
|
||||
get: function RefSetCache_get(ref) {
|
||||
return this.dict[ref.toString()];
|
||||
},
|
||||
|
||||
has: function RefSetCache_has(ref) {
|
||||
return ref.toString() in this.dict;
|
||||
},
|
||||
|
||||
put: function RefSetCache_put(ref, obj) {
|
||||
this.dict[ref.toString()] = obj;
|
||||
},
|
||||
|
||||
putAlias: function RefSetCache_putAlias(ref, aliasRef) {
|
||||
this.dict[ref.toString()] = this.get(aliasRef);
|
||||
},
|
||||
|
||||
forEach: function RefSetCache_forEach(fn, thisArg) {
|
||||
for (var i in this.dict) {
|
||||
fn.call(thisArg, this.dict[i]);
|
||||
}
|
||||
},
|
||||
|
||||
clear: function RefSetCache_clear() {
|
||||
this.dict = Object.create(null);
|
||||
}
|
||||
};
|
||||
|
||||
return RefSetCache;
|
||||
})();
|
||||
var InvalidPDFException = sharedUtil.InvalidPDFException;
|
||||
var MissingDataException = sharedUtil.MissingDataException;
|
||||
var XRefParseException = sharedUtil.XRefParseException;
|
||||
var assert = sharedUtil.assert;
|
||||
var bytesToString = sharedUtil.bytesToString;
|
||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var isString = sharedUtil.isString;
|
||||
var shadow = sharedUtil.shadow;
|
||||
var stringToPDFString = sharedUtil.stringToPDFString;
|
||||
var stringToUTF8String = sharedUtil.stringToUTF8String;
|
||||
var warn = sharedUtil.warn;
|
||||
var Ref = corePrimitives.Ref;
|
||||
var RefSet = corePrimitives.RefSet;
|
||||
var RefSetCache = corePrimitives.RefSetCache;
|
||||
var isName = corePrimitives.isName;
|
||||
var isCmd = corePrimitives.isCmd;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isRef = corePrimitives.isRef;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var CipherTransformFactory = coreCrypto.CipherTransformFactory;
|
||||
var Lexer = coreParser.Lexer;
|
||||
var Parser = coreParser.Parser;
|
||||
var ChunkedStream = coreChunkedStream.ChunkedStream;
|
||||
|
||||
var Catalog = (function CatalogClosure() {
|
||||
function Catalog(pdfManager, xref) {
|
||||
function Catalog(pdfManager, xref, pageFactory) {
|
||||
this.pdfManager = pdfManager;
|
||||
this.xref = xref;
|
||||
this.catDict = xref.getCatalogObj();
|
||||
|
@ -339,6 +69,8 @@ var Catalog = (function CatalogClosure() {
|
|||
assert(isDict(this.catDict),
|
||||
'catalog object is not a dictionary');
|
||||
|
||||
// TODO refactor to move getPage() to the PDFDocument.
|
||||
this.pageFactory = pageFactory;
|
||||
this.pagePromises = [];
|
||||
}
|
||||
|
||||
|
@ -617,8 +349,8 @@ var Catalog = (function CatalogClosure() {
|
|||
function (a) {
|
||||
var dict = a[0];
|
||||
var ref = a[1];
|
||||
return new Page(this.pdfManager, this.xref, pageIndex, dict, ref,
|
||||
this.fontCache);
|
||||
return this.pageFactory.createPage(pageIndex, dict, ref,
|
||||
this.fontCache);
|
||||
}.bind(this)
|
||||
);
|
||||
}
|
||||
|
@ -1749,3 +1481,8 @@ var ObjectLoader = (function() {
|
|||
|
||||
return ObjectLoader;
|
||||
})();
|
||||
|
||||
exports.Catalog = Catalog;
|
||||
exports.ObjectLoader = ObjectLoader;
|
||||
exports.XRef = XRef;
|
||||
}));
|
||||
|
|
|
@ -12,14 +12,51 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals Ascii85Stream, AsciiHexStream, CCITTFaxStream, Cmd, Dict, error,
|
||||
FlateStream, isArray, isCmd, isDict, isInt, isName, isNum, isRef,
|
||||
isString, Jbig2Stream, JpegStream, JpxStream, LZWStream, Name,
|
||||
NullStream, PredictorStream, Ref, RunLengthStream, warn, info,
|
||||
StreamType, MissingDataException, assert */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/parser', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./stream.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreParser = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream) {
|
||||
|
||||
var MissingDataException = sharedUtil.MissingDataException;
|
||||
var StreamType = sharedUtil.StreamType;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var isNum = sharedUtil.isNum;
|
||||
var isString = sharedUtil.isString;
|
||||
var warn = sharedUtil.warn;
|
||||
var Cmd = corePrimitives.Cmd;
|
||||
var Dict = corePrimitives.Dict;
|
||||
var Name = corePrimitives.Name;
|
||||
var Ref = corePrimitives.Ref;
|
||||
var isCmd = corePrimitives.isCmd;
|
||||
var isDict = corePrimitives.isDict;
|
||||
var isName = corePrimitives.isName;
|
||||
var Ascii85Stream = coreStream.Ascii85Stream;
|
||||
var AsciiHexStream = coreStream.AsciiHexStream;
|
||||
var CCITTFaxStream = coreStream.CCITTFaxStream;
|
||||
var FlateStream = coreStream.FlateStream;
|
||||
var Jbig2Stream = coreStream.Jbig2Stream;
|
||||
var JpegStream = coreStream.JpegStream;
|
||||
var JpxStream = coreStream.JpxStream;
|
||||
var LZWStream = coreStream.LZWStream;
|
||||
var NullStream = coreStream.NullStream;
|
||||
var PredictorStream = coreStream.PredictorStream;
|
||||
var RunLengthStream = coreStream.RunLengthStream;
|
||||
|
||||
var EOF = {};
|
||||
|
||||
function isEOF(v) {
|
||||
|
@ -1074,3 +1111,13 @@ var Linearization = {
|
|||
};
|
||||
}
|
||||
};
|
||||
|
||||
exports.EOF = EOF;
|
||||
exports.Lexer = Lexer;
|
||||
exports.Linearization = Linearization;
|
||||
exports.Parser = Parser;
|
||||
exports.isEOF = isEOF;
|
||||
|
||||
// TODO refactor to remove dependency on stream.js
|
||||
coreStream._setCoreParser(exports);
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,36 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals ColorSpace, PDFFunction, Util, error, warn, info, isArray, isStream,
|
||||
assert, isPDFFunction, UNSUPPORTED_FEATURES, MissingDataException */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/pattern', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/function',
|
||||
'pdfjs/core/colorspace'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./function.js'), require('./colorspace.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCorePattern = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreFunction,
|
||||
root.pdfjsCoreColorSpace);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreFunction,
|
||||
coreColorSpace) {
|
||||
|
||||
var UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES;
|
||||
var MissingDataException = sharedUtil.MissingDataException;
|
||||
var Util = sharedUtil.Util;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var warn = sharedUtil.warn;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var PDFFunction = coreFunction.PDFFunction;
|
||||
var ColorSpace = coreColorSpace.ColorSpace;
|
||||
|
||||
var ShadingType = {
|
||||
FUNCTION_BASED: 1,
|
||||
AXIAL: 2,
|
||||
|
@ -805,3 +830,7 @@ function getTilingPatternIR(operatorList, dict, args) {
|
|||
paintType, tilingType
|
||||
];
|
||||
}
|
||||
|
||||
exports.Pattern = Pattern;
|
||||
exports.getTilingPatternIR = getTilingPatternIR;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,33 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals NotImplementedException, MissingDataException, Promise, Stream,
|
||||
PDFDocument, ChunkedStreamManager, createPromiseCapability, Util */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/pdf_manager', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/stream', 'pdfjs/core/chunked_stream', 'pdfjs/core/document'],
|
||||
factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./stream.js'),
|
||||
require('./chunked_stream.js'), require('./document.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCorePdfManager = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCoreStream, root.pdfjsCoreChunkedStream,
|
||||
root.pdfjsCoreDocument);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, coreStream, coreChunkedStream,
|
||||
coreDocument) {
|
||||
|
||||
var NotImplementedException = sharedUtil.NotImplementedException;
|
||||
var MissingDataException = sharedUtil.MissingDataException;
|
||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
||||
var Util = sharedUtil.Util;
|
||||
var Stream = coreStream.Stream;
|
||||
var ChunkedStreamManager = coreChunkedStream.ChunkedStreamManager;
|
||||
var PDFDocument = coreDocument.PDFDocument;
|
||||
|
||||
var BasePdfManager = (function BasePdfManagerClosure() {
|
||||
function BasePdfManager() {
|
||||
throw new Error('Cannot initialize BaseManagerManager');
|
||||
|
@ -207,3 +229,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
|||
|
||||
return NetworkPdfManager;
|
||||
})();
|
||||
|
||||
exports.LocalPdfManager = LocalPdfManager;
|
||||
exports.NetworkPdfManager = NetworkPdfManager;
|
||||
}));
|
||||
|
|
378
src/core/primitives.js
Normal file
378
src/core/primitives.js
Normal file
|
@ -0,0 +1,378 @@
|
|||
/* Copyright 2012 Mozilla Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* uses XRef */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/primitives', ['exports', 'pdfjs/shared/util'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCorePrimitives = {}), root.pdfjsSharedUtil);
|
||||
}
|
||||
}(this, function (exports, sharedUtil) {
|
||||
|
||||
var isArray = sharedUtil.isArray;
|
||||
|
||||
var Name = (function NameClosure() {
|
||||
function Name(name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
Name.prototype = {};
|
||||
|
||||
var nameCache = {};
|
||||
|
||||
Name.get = function Name_get(name) {
|
||||
var nameValue = nameCache[name];
|
||||
return (nameValue ? nameValue : (nameCache[name] = new Name(name)));
|
||||
};
|
||||
|
||||
return Name;
|
||||
})();
|
||||
|
||||
var Cmd = (function CmdClosure() {
|
||||
function Cmd(cmd) {
|
||||
this.cmd = cmd;
|
||||
}
|
||||
|
||||
Cmd.prototype = {};
|
||||
|
||||
var cmdCache = {};
|
||||
|
||||
Cmd.get = function Cmd_get(cmd) {
|
||||
var cmdValue = cmdCache[cmd];
|
||||
return (cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd)));
|
||||
};
|
||||
|
||||
return Cmd;
|
||||
})();
|
||||
|
||||
var Dict = (function DictClosure() {
|
||||
var nonSerializable = function nonSerializableClosure() {
|
||||
return nonSerializable; // creating closure on some variable
|
||||
};
|
||||
|
||||
var GETALL_DICTIONARY_TYPES_WHITELIST = {
|
||||
'Background': true,
|
||||
'ExtGState': true,
|
||||
'Halftone': true,
|
||||
'Layout': true,
|
||||
'Mask': true,
|
||||
'Pagination': true,
|
||||
'Printing': true
|
||||
};
|
||||
|
||||
function isRecursionAllowedFor(dict) {
|
||||
if (!isName(dict.Type)) {
|
||||
return true;
|
||||
}
|
||||
var dictType = dict.Type.name;
|
||||
return GETALL_DICTIONARY_TYPES_WHITELIST[dictType] === true;
|
||||
}
|
||||
|
||||
// xref is optional
|
||||
function Dict(xref) {
|
||||
// Map should only be used internally, use functions below to access.
|
||||
this.map = Object.create(null);
|
||||
this.xref = xref;
|
||||
this.objId = null;
|
||||
this.__nonSerializable__ = nonSerializable; // disable cloning of the Dict
|
||||
}
|
||||
|
||||
Dict.prototype = {
|
||||
assignXref: function Dict_assignXref(newXref) {
|
||||
this.xref = newXref;
|
||||
},
|
||||
|
||||
// automatically dereferences Ref objects
|
||||
get: function Dict_get(key1, key2, key3) {
|
||||
var value;
|
||||
var xref = this.xref;
|
||||
if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
|
||||
typeof key2 === 'undefined') {
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
}
|
||||
if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
|
||||
typeof key3 === 'undefined') {
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
}
|
||||
value = this.map[key3] || null;
|
||||
return xref ? xref.fetchIfRef(value) : value;
|
||||
},
|
||||
|
||||
// Same as get(), but returns a promise and uses fetchIfRefAsync().
|
||||
getAsync: function Dict_getAsync(key1, key2, key3) {
|
||||
var value;
|
||||
var xref = this.xref;
|
||||
if (typeof (value = this.map[key1]) !== 'undefined' || key1 in this.map ||
|
||||
typeof key2 === 'undefined') {
|
||||
if (xref) {
|
||||
return xref.fetchIfRefAsync(value);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
}
|
||||
if (typeof (value = this.map[key2]) !== 'undefined' || key2 in this.map ||
|
||||
typeof key3 === 'undefined') {
|
||||
if (xref) {
|
||||
return xref.fetchIfRefAsync(value);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
}
|
||||
value = this.map[key3] || null;
|
||||
if (xref) {
|
||||
return xref.fetchIfRefAsync(value);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
},
|
||||
|
||||
// Same as get(), but dereferences all elements if the result is an Array.
|
||||
getArray: function Dict_getArray(key1, key2, key3) {
|
||||
var value = this.get(key1, key2, key3);
|
||||
var xref = this.xref;
|
||||
if (!isArray(value) || !xref) {
|
||||
return value;
|
||||
}
|
||||
value = value.slice(); // Ensure that we don't modify the Dict data.
|
||||
for (var i = 0, ii = value.length; i < ii; i++) {
|
||||
if (!isRef(value[i])) {
|
||||
continue;
|
||||
}
|
||||
value[i] = xref.fetch(value[i]);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
||||
// no dereferencing
|
||||
getRaw: function Dict_getRaw(key) {
|
||||
return this.map[key];
|
||||
},
|
||||
|
||||
// creates new map and dereferences all Refs
|
||||
getAll: function Dict_getAll() {
|
||||
var all = Object.create(null);
|
||||
var queue = null;
|
||||
var key, obj;
|
||||
for (key in this.map) {
|
||||
obj = this.get(key);
|
||||
if (obj instanceof Dict) {
|
||||
if (isRecursionAllowedFor(obj)) {
|
||||
(queue || (queue = [])).push({target: all, key: key, obj: obj});
|
||||
} else {
|
||||
all[key] = this.getRaw(key);
|
||||
}
|
||||
} else {
|
||||
all[key] = obj;
|
||||
}
|
||||
}
|
||||
if (!queue) {
|
||||
return all;
|
||||
}
|
||||
|
||||
// trying to take cyclic references into the account
|
||||
var processed = Object.create(null);
|
||||
while (queue.length > 0) {
|
||||
var item = queue.shift();
|
||||
var itemObj = item.obj;
|
||||
var objId = itemObj.objId;
|
||||
if (objId && objId in processed) {
|
||||
item.target[item.key] = processed[objId];
|
||||
continue;
|
||||
}
|
||||
var dereferenced = Object.create(null);
|
||||
for (key in itemObj.map) {
|
||||
obj = itemObj.get(key);
|
||||
if (obj instanceof Dict) {
|
||||
if (isRecursionAllowedFor(obj)) {
|
||||
queue.push({target: dereferenced, key: key, obj: obj});
|
||||
} else {
|
||||
dereferenced[key] = itemObj.getRaw(key);
|
||||
}
|
||||
} else {
|
||||
dereferenced[key] = obj;
|
||||
}
|
||||
}
|
||||
if (objId) {
|
||||
processed[objId] = dereferenced;
|
||||
}
|
||||
item.target[item.key] = dereferenced;
|
||||
}
|
||||
return all;
|
||||
},
|
||||
|
||||
getKeys: function Dict_getKeys() {
|
||||
return Object.keys(this.map);
|
||||
},
|
||||
|
||||
set: function Dict_set(key, value) {
|
||||
this.map[key] = value;
|
||||
},
|
||||
|
||||
has: function Dict_has(key) {
|
||||
return key in this.map;
|
||||
},
|
||||
|
||||
forEach: function Dict_forEach(callback) {
|
||||
for (var key in this.map) {
|
||||
callback(key, this.get(key));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Dict.empty = new Dict(null);
|
||||
|
||||
Dict.merge = function Dict_merge(xref, dictArray) {
|
||||
var mergedDict = new Dict(xref);
|
||||
|
||||
for (var i = 0, ii = dictArray.length; i < ii; i++) {
|
||||
var dict = dictArray[i];
|
||||
if (!isDict(dict)) {
|
||||
continue;
|
||||
}
|
||||
for (var keyName in dict.map) {
|
||||
if (mergedDict.map[keyName]) {
|
||||
continue;
|
||||
}
|
||||
mergedDict.map[keyName] = dict.map[keyName];
|
||||
}
|
||||
}
|
||||
return mergedDict;
|
||||
};
|
||||
|
||||
return Dict;
|
||||
})();
|
||||
|
||||
var Ref = (function RefClosure() {
|
||||
function Ref(num, gen) {
|
||||
this.num = num;
|
||||
this.gen = gen;
|
||||
}
|
||||
|
||||
Ref.prototype = {
|
||||
toString: function Ref_toString() {
|
||||
// This function is hot, so we make the string as compact as possible.
|
||||
// |this.gen| is almost always zero, so we treat that case specially.
|
||||
var str = this.num + 'R';
|
||||
if (this.gen !== 0) {
|
||||
str += this.gen;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
return Ref;
|
||||
})();
|
||||
|
||||
// The reference is identified by number and generation.
|
||||
// This structure stores only one instance of the reference.
|
||||
var RefSet = (function RefSetClosure() {
|
||||
function RefSet() {
|
||||
this.dict = {};
|
||||
}
|
||||
|
||||
RefSet.prototype = {
|
||||
has: function RefSet_has(ref) {
|
||||
return ref.toString() in this.dict;
|
||||
},
|
||||
|
||||
put: function RefSet_put(ref) {
|
||||
this.dict[ref.toString()] = true;
|
||||
},
|
||||
|
||||
remove: function RefSet_remove(ref) {
|
||||
delete this.dict[ref.toString()];
|
||||
}
|
||||
};
|
||||
|
||||
return RefSet;
|
||||
})();
|
||||
|
||||
var RefSetCache = (function RefSetCacheClosure() {
|
||||
function RefSetCache() {
|
||||
this.dict = Object.create(null);
|
||||
}
|
||||
|
||||
RefSetCache.prototype = {
|
||||
get: function RefSetCache_get(ref) {
|
||||
return this.dict[ref.toString()];
|
||||
},
|
||||
|
||||
has: function RefSetCache_has(ref) {
|
||||
return ref.toString() in this.dict;
|
||||
},
|
||||
|
||||
put: function RefSetCache_put(ref, obj) {
|
||||
this.dict[ref.toString()] = obj;
|
||||
},
|
||||
|
||||
putAlias: function RefSetCache_putAlias(ref, aliasRef) {
|
||||
this.dict[ref.toString()] = this.get(aliasRef);
|
||||
},
|
||||
|
||||
forEach: function RefSetCache_forEach(fn, thisArg) {
|
||||
for (var i in this.dict) {
|
||||
fn.call(thisArg, this.dict[i]);
|
||||
}
|
||||
},
|
||||
|
||||
clear: function RefSetCache_clear() {
|
||||
this.dict = Object.create(null);
|
||||
}
|
||||
};
|
||||
|
||||
return RefSetCache;
|
||||
})();
|
||||
|
||||
function isName(v) {
|
||||
return v instanceof Name;
|
||||
}
|
||||
|
||||
function isCmd(v, cmd) {
|
||||
return v instanceof Cmd && (cmd === undefined || v.cmd === cmd);
|
||||
}
|
||||
|
||||
function isDict(v, type) {
|
||||
if (!(v instanceof Dict)) {
|
||||
return false;
|
||||
}
|
||||
if (!type) {
|
||||
return true;
|
||||
}
|
||||
var dictType = v.get('Type');
|
||||
return isName(dictType) && dictType.name === type;
|
||||
}
|
||||
|
||||
function isRef(v) {
|
||||
return v instanceof Ref;
|
||||
}
|
||||
|
||||
function isStream(v) {
|
||||
return typeof v === 'object' && v !== null && v.getBytes !== undefined;
|
||||
}
|
||||
|
||||
exports.Cmd = Cmd;
|
||||
exports.Dict = Dict;
|
||||
exports.Name = Name;
|
||||
exports.Ref = Ref;
|
||||
exports.RefSet = RefSet;
|
||||
exports.RefSetCache = RefSetCache;
|
||||
exports.isCmd = isCmd;
|
||||
exports.isDict = isDict;
|
||||
exports.isName = isName;
|
||||
exports.isRef = isRef;
|
||||
exports.isStream = isStream;
|
||||
}));
|
|
@ -12,10 +12,25 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals EOF, error, Lexer */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/ps_parser', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/parser'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./parser.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCorePsParser = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCoreParser);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, coreParser) {
|
||||
|
||||
var error = sharedUtil.error;
|
||||
var EOF = coreParser.EOF;
|
||||
var Lexer = coreParser.Lexer;
|
||||
|
||||
var PostScriptParser = (function PostScriptParserClosure() {
|
||||
function PostScriptParser(lexer) {
|
||||
this.lexer = lexer;
|
||||
|
@ -218,3 +233,7 @@ var PostScriptLexer = (function PostScriptLexerClosure() {
|
|||
};
|
||||
return PostScriptLexer;
|
||||
})();
|
||||
|
||||
exports.PostScriptLexer = PostScriptLexer;
|
||||
exports.PostScriptParser = PostScriptParser;
|
||||
}));
|
||||
|
|
|
@ -12,11 +12,44 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals bytesToString, ColorSpace, Dict, EOF, error, info, isArray,
|
||||
Jbig2Image, JpegImage, JpxImage, Lexer, PDFJS, shadow, Util, warn */
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/stream', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/jbig2', 'pdfjs/core/jpg',
|
||||
'pdfjs/core/jpx'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./jbig2.js'), require('./jpg.js'), require('./jpx.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreStream = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreJbig2, root.pdfjsCoreJpg,
|
||||
root.pdfjsCoreJpx);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreJbig2, coreJpg,
|
||||
coreJpx) {
|
||||
|
||||
var Util = sharedUtil.Util;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var shadow = sharedUtil.shadow;
|
||||
var warn = sharedUtil.warn;
|
||||
var Dict = corePrimitives.Dict;
|
||||
var Jbig2Image = coreJbig2.Jbig2Image;
|
||||
var JpegImage = coreJpg.JpegImage;
|
||||
var JpxImage = coreJpx.JpxImage;
|
||||
|
||||
var coreParser; // see _setCoreParser below
|
||||
var EOF; // = coreParser.EOF;
|
||||
var Lexer; // = coreParser.Lexer;
|
||||
|
||||
var coreColorSpace; // see _setCoreColorSpace below
|
||||
var ColorSpace; // = coreColorSpace.ColorSpace;
|
||||
|
||||
var Stream = (function StreamClosure() {
|
||||
function Stream(arrayBuffer, start, length, dict) {
|
||||
this.bytes = (arrayBuffer instanceof Uint8Array ?
|
||||
|
@ -2464,3 +2497,36 @@ var NullStream = (function NullStreamClosure() {
|
|||
|
||||
return NullStream;
|
||||
})();
|
||||
|
||||
// TODO refactor to remove dependency on parser.js
|
||||
function _setCoreParser(coreParser_) {
|
||||
coreParser = coreParser_;
|
||||
EOF = coreParser_.EOF;
|
||||
Lexer = coreParser_.Lexer;
|
||||
}
|
||||
exports._setCoreParser = _setCoreParser;
|
||||
|
||||
// TODO refactor to remove dependency on colorspace.js
|
||||
function _setCoreColorSpace(coreColorSpace_) {
|
||||
coreColorSpace = coreColorSpace_;
|
||||
ColorSpace = coreColorSpace_.ColorSpace;
|
||||
}
|
||||
exports._setCoreColorSpace = _setCoreColorSpace;
|
||||
|
||||
exports.Ascii85Stream = Ascii85Stream;
|
||||
exports.AsciiHexStream = AsciiHexStream;
|
||||
exports.CCITTFaxStream = CCITTFaxStream;
|
||||
exports.DecryptStream = DecryptStream;
|
||||
exports.DecodeStream = DecodeStream;
|
||||
exports.FlateStream = FlateStream;
|
||||
exports.Jbig2Stream = Jbig2Stream;
|
||||
exports.JpegStream = JpegStream;
|
||||
exports.JpxStream = JpxStream;
|
||||
exports.NullStream = NullStream;
|
||||
exports.PredictorStream = PredictorStream;
|
||||
exports.RunLengthStream = RunLengthStream;
|
||||
exports.Stream = Stream;
|
||||
exports.StreamsSequenceStream = StreamsSequenceStream;
|
||||
exports.StringStream = StringStream;
|
||||
exports.LZWStream = LZWStream;
|
||||
}));
|
||||
|
|
|
@ -12,14 +12,46 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals PDFJS, createPromiseCapability, LocalPdfManager, NetworkPdfManager,
|
||||
NetworkManager, isInt, MissingPDFException, UNSUPPORTED_FEATURES,
|
||||
UnexpectedResponseException, PasswordException, Promise, warn,
|
||||
PasswordResponses, InvalidPDFException, UnknownErrorException,
|
||||
XRefParseException, Ref, info, globalScope, error, MessageHandler */
|
||||
/* globals NetworkManager */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/worker', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/pdf_manager', 'pdfjs/shared/global'],
|
||||
factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./pdf_manager.js'), require('../shared/global.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreWorker = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCorePdfManager,
|
||||
root.pdfjsSharedGlobal);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, corePdfManager,
|
||||
sharedGlobal) {
|
||||
|
||||
var UNSUPPORTED_FEATURES = sharedUtil.UNSUPPORTED_FEATURES;
|
||||
var InvalidPDFException = sharedUtil.InvalidPDFException;
|
||||
var MessageHandler = sharedUtil.MessageHandler;
|
||||
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 createPromiseCapability = sharedUtil.createPromiseCapability;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isInt = sharedUtil.isInt;
|
||||
var warn = sharedUtil.warn;
|
||||
var Ref = corePrimitives.Ref;
|
||||
var LocalPdfManager = corePdfManager.LocalPdfManager;
|
||||
var NetworkPdfManager = corePdfManager.NetworkPdfManager;
|
||||
var globalScope = sharedGlobal.globalScope;
|
||||
var PDFJS = sharedGlobal.PDFJS;
|
||||
|
||||
var WorkerTask = (function WorkerTaskClosure() {
|
||||
function WorkerTask(name) {
|
||||
this.name = name;
|
||||
|
@ -621,6 +653,10 @@ if (typeof window === 'undefined') {
|
|||
globalScope.console = workerConsole;
|
||||
}
|
||||
|
||||
var handler = new MessageHandler('worker', 'main', this);
|
||||
WorkerMessageHandler.setup(handler, this);
|
||||
var handler = new MessageHandler('worker', 'main', self);
|
||||
WorkerMessageHandler.setup(handler, self);
|
||||
}
|
||||
|
||||
exports.WorkerTask = WorkerTask;
|
||||
exports.WorkerMessageHandler = WorkerMessageHandler;
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue