Merge pull request #8284 from Snuffleupagus/es6-modules-src
Convert the files in the `/src/core` folder to ES6 modules
This commit is contained in:
commit
e51718711b
12
gulpfile.js
12
gulpfile.js
@ -1055,22 +1055,22 @@ gulp.task('publish', ['generic'], function (done) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('test', function () {
|
gulp.task('test', ['generic'], function () {
|
||||||
return streamqueue({ objectMode: true },
|
return streamqueue({ objectMode: true },
|
||||||
createTestSource('unit'), createTestSource('browser'));
|
createTestSource('unit'), createTestSource('browser'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('bottest', function () {
|
gulp.task('bottest', ['generic'], function () {
|
||||||
return streamqueue({ objectMode: true },
|
return streamqueue({ objectMode: true },
|
||||||
createTestSource('unit'), createTestSource('font'),
|
createTestSource('unit'), createTestSource('font'),
|
||||||
createTestSource('browser (no reftest)'));
|
createTestSource('browser (no reftest)'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('browsertest', function () {
|
gulp.task('browsertest', ['generic'], function () {
|
||||||
return createTestSource('browser');
|
return createTestSource('browser');
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('unittest', function () {
|
gulp.task('unittest', ['generic'], function () {
|
||||||
return createTestSource('unit');
|
return createTestSource('unit');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1078,11 +1078,11 @@ gulp.task('fonttest', function () {
|
|||||||
return createTestSource('font');
|
return createTestSource('font');
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('makeref', function (done) {
|
gulp.task('makeref', ['generic'], function (done) {
|
||||||
makeRef(done);
|
makeRef(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('botmakeref', function (done) {
|
gulp.task('botmakeref', ['generic'], function (done) {
|
||||||
makeRef(done, true);
|
makeRef(done, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -13,47 +13,16 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
AnnotationBorderStyleType, AnnotationFieldFlag, AnnotationFlag,
|
||||||
(function (root, factory) {
|
AnnotationType, isArray, isInt, OPS, stringToBytes, stringToPDFString, Util,
|
||||||
if (typeof define === 'function' && define.amd) {
|
warn
|
||||||
define('pdfjs/core/annotation', ['exports', 'pdfjs/shared/util',
|
} from '../shared/util';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/colorspace',
|
import { Catalog, FileSpec, ObjectLoader } from './obj';
|
||||||
'pdfjs/core/obj', 'pdfjs/core/evaluator'], factory);
|
import { Dict, isDict, isName, isRef, isStream } from './primitives';
|
||||||
} else if (typeof exports !== 'undefined') {
|
import { ColorSpace } from './colorspace';
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
import { OperatorList } from './evaluator';
|
||||||
require('./stream.js'), require('./colorspace.js'), require('./obj.js'),
|
import { Stream } from './stream';
|
||||||
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 AnnotationFieldFlag = sharedUtil.AnnotationFieldFlag;
|
|
||||||
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 stringToBytes = sharedUtil.stringToBytes;
|
|
||||||
var stringToPDFString = sharedUtil.stringToPDFString;
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var Dict = corePrimitives.Dict;
|
|
||||||
var isDict = corePrimitives.isDict;
|
|
||||||
var isName = corePrimitives.isName;
|
|
||||||
var isRef = corePrimitives.isRef;
|
|
||||||
var isStream = corePrimitives.isStream;
|
|
||||||
var Stream = coreStream.Stream;
|
|
||||||
var ColorSpace = coreColorSpace.ColorSpace;
|
|
||||||
var Catalog = coreObj.Catalog;
|
|
||||||
var ObjectLoader = coreObj.ObjectLoader;
|
|
||||||
var FileSpec = coreObj.FileSpec;
|
|
||||||
var OperatorList = coreEvaluator.OperatorList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
@ -1074,7 +1043,8 @@ var FileAttachmentAnnotation = (function FileAttachmentAnnotationClosure() {
|
|||||||
return FileAttachmentAnnotation;
|
return FileAttachmentAnnotation;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.Annotation = Annotation;
|
export {
|
||||||
exports.AnnotationBorderStyle = AnnotationBorderStyle;
|
Annotation,
|
||||||
exports.AnnotationFactory = AnnotationFactory;
|
AnnotationBorderStyle,
|
||||||
}));
|
AnnotationFactory,
|
||||||
|
};
|
||||||
|
@ -13,18 +13,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'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
|
/* This class implements the QM Coder decoding as defined in
|
||||||
* JPEG 2000 Part I Final Committee Draft Version 1.0
|
* JPEG 2000 Part I Final Committee Draft Version 1.0
|
||||||
* Annex C.3 Arithmetic decoding procedure
|
* Annex C.3 Arithmetic decoding procedure
|
||||||
@ -192,5 +180,6 @@ var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
|
|||||||
return ArithmeticDecoder;
|
return ArithmeticDecoder;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.ArithmeticDecoder = ArithmeticDecoder;
|
export {
|
||||||
}));
|
ArithmeticDecoder,
|
||||||
|
};
|
||||||
|
@ -13,22 +13,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { warn } from '../shared/util';
|
||||||
|
|
||||||
(function (root, factory) {
|
// Character types for symbols from 0000 to 00FF.
|
||||||
if (typeof define === 'function' && define.amd) {
|
// Source: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||||
define('pdfjs/core/bidi', ['exports', 'pdfjs/shared/util'], factory);
|
var baseTypes = [
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreBidi = {}), root.pdfjsSharedUtil);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil) {
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
|
|
||||||
// Character types for symbols from 0000 to 00FF.
|
|
||||||
// Source: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
|
|
||||||
var baseTypes = [
|
|
||||||
'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S',
|
'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S',
|
||||||
'WS', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
|
'WS', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
|
||||||
'BN', 'BN', 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET',
|
'BN', 'BN', 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET',
|
||||||
@ -49,15 +38,15 @@
|
|||||||
'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
|
'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
|
||||||
'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
|
'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
|
||||||
'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'
|
'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Character types for symbols from 0600 to 06FF.
|
// Character types for symbols from 0600 to 06FF.
|
||||||
// Source: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
|
// Source: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||||
// Note that 061D does not exist in the Unicode standard (see
|
// Note that 061D does not exist in the Unicode standard (see
|
||||||
// http://unicode.org/charts/PDF/U0600.pdf), so we replace it with an
|
// http://unicode.org/charts/PDF/U0600.pdf), so we replace it with an
|
||||||
// empty string and issue a warning if we encounter this character. The
|
// empty string and issue a warning if we encounter this character. The
|
||||||
// empty string is required to properly index the items after it.
|
// empty string is required to properly index the items after it.
|
||||||
var arabicTypes = [
|
var arabicTypes = [
|
||||||
'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ON', 'ON', 'AL', 'ET', 'ET', 'AL',
|
'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ON', 'ON', 'AL', 'ET', 'ET', 'AL',
|
||||||
'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
|
'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
|
||||||
'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', '', 'AL', 'AL', 'AL', 'AL', 'AL',
|
'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', '', 'AL', 'AL', 'AL', 'AL', 'AL',
|
||||||
@ -80,52 +69,52 @@
|
|||||||
'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'NSM', 'NSM',
|
'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'NSM', 'NSM',
|
||||||
'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'EN', 'EN', 'EN', 'EN',
|
'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'EN', 'EN', 'EN', 'EN',
|
||||||
'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
|
'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
|
||||||
];
|
];
|
||||||
|
|
||||||
function isOdd(i) {
|
function isOdd(i) {
|
||||||
return (i & 1) !== 0;
|
return (i & 1) !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isEven(i) {
|
function isEven(i) {
|
||||||
return (i & 1) === 0;
|
return (i & 1) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function findUnequal(arr, start, value) {
|
function findUnequal(arr, start, value) {
|
||||||
for (var j = start, jj = arr.length; j < jj; ++j) {
|
for (var j = start, jj = arr.length; j < jj; ++j) {
|
||||||
if (arr[j] !== value) {
|
if (arr[j] !== value) {
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setValues(arr, start, end, value) {
|
function setValues(arr, start, end, value) {
|
||||||
for (var j = start; j < end; ++j) {
|
for (var j = start; j < end; ++j) {
|
||||||
arr[j] = value;
|
arr[j] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reverseValues(arr, start, end) {
|
function reverseValues(arr, start, end) {
|
||||||
for (var i = start, j = end - 1; i < j; ++i, --j) {
|
for (var i = start, j = end - 1; i < j; ++i, --j) {
|
||||||
var temp = arr[i];
|
var temp = arr[i];
|
||||||
arr[i] = arr[j];
|
arr[i] = arr[j];
|
||||||
arr[j] = temp;
|
arr[j] = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createBidiText(str, isLTR, vertical) {
|
function createBidiText(str, isLTR, vertical) {
|
||||||
return {
|
return {
|
||||||
str,
|
str,
|
||||||
dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl'))
|
dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl'))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are used in bidi(), which is called frequently. We re-use them on
|
// These are used in bidi(), which is called frequently. We re-use them on
|
||||||
// each call to avoid unnecessary allocations.
|
// each call to avoid unnecessary allocations.
|
||||||
var chars = [];
|
var chars = [];
|
||||||
var types = [];
|
var types = [];
|
||||||
|
|
||||||
function bidi(str, startLevel, vertical) {
|
function bidi(str, startLevel, vertical) {
|
||||||
var isLTR = true;
|
var isLTR = true;
|
||||||
var strLength = str.length;
|
var strLength = str.length;
|
||||||
if (strLength === 0 || vertical) {
|
if (strLength === 0 || vertical) {
|
||||||
@ -436,7 +425,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return createBidiText(chars.join(''), isLTR);
|
return createBidiText(chars.join(''), isLTR);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.bidi = bidi;
|
export {
|
||||||
}));
|
bidi,
|
||||||
|
};
|
||||||
|
@ -13,34 +13,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, bytesToString, error, info, isArray, stringToBytes, Util, warn
|
||||||
(function (root, factory) {
|
} from '../shared/util';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import {
|
||||||
define('pdfjs/core/cff_parser', ['exports', 'pdfjs/shared/util',
|
ExpertCharset, ExpertSubsetCharset, ISOAdobeCharset
|
||||||
'pdfjs/core/charsets', 'pdfjs/core/encodings'], factory);
|
} from './charsets';
|
||||||
} else if (typeof exports !== 'undefined') {
|
import { ExpertEncoding, StandardEncoding } from './encodings';
|
||||||
factory(exports, require('../shared/util.js'), require('./charsets.js'),
|
|
||||||
require('./encodings.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreCFFParser = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCoreCharsets, root.pdfjsCoreEncodings);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, coreCharsets, coreEncodings) {
|
|
||||||
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
var info = sharedUtil.info;
|
|
||||||
var bytesToString = sharedUtil.bytesToString;
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var isArray = sharedUtil.isArray;
|
|
||||||
var Util = sharedUtil.Util;
|
|
||||||
var stringToBytes = sharedUtil.stringToBytes;
|
|
||||||
var assert = sharedUtil.assert;
|
|
||||||
var ISOAdobeCharset = coreCharsets.ISOAdobeCharset;
|
|
||||||
var ExpertCharset = coreCharsets.ExpertCharset;
|
|
||||||
var ExpertSubsetCharset = coreCharsets.ExpertSubsetCharset;
|
|
||||||
var StandardEncoding = coreEncodings.StandardEncoding;
|
|
||||||
var ExpertEncoding = coreEncodings.ExpertEncoding;
|
|
||||||
|
|
||||||
// Maximum subroutine call depth of type 2 chartrings. Matches OTS.
|
// Maximum subroutine call depth of type 2 chartrings. Matches OTS.
|
||||||
var MAX_SUBR_NESTING = 10;
|
var MAX_SUBR_NESTING = 10;
|
||||||
@ -1651,14 +1630,15 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
|||||||
return CFFCompiler;
|
return CFFCompiler;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.CFFStandardStrings = CFFStandardStrings;
|
export {
|
||||||
exports.CFFParser = CFFParser;
|
CFFStandardStrings,
|
||||||
exports.CFF = CFF;
|
CFFParser,
|
||||||
exports.CFFHeader = CFFHeader;
|
CFF,
|
||||||
exports.CFFStrings = CFFStrings;
|
CFFHeader,
|
||||||
exports.CFFIndex = CFFIndex;
|
CFFStrings,
|
||||||
exports.CFFCharset = CFFCharset;
|
CFFIndex,
|
||||||
exports.CFFTopDict = CFFTopDict;
|
CFFCharset,
|
||||||
exports.CFFPrivateDict = CFFPrivateDict;
|
CFFTopDict,
|
||||||
exports.CFFCompiler = CFFCompiler;
|
CFFPrivateDict,
|
||||||
}));
|
CFFCompiler,
|
||||||
|
};
|
||||||
|
@ -13,18 +13,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'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 = [
|
var ISOAdobeCharset = [
|
||||||
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
|
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
|
||||||
'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
|
'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
|
||||||
@ -125,7 +113,8 @@ var ExpertSubsetCharset = [
|
|||||||
'periodinferior', 'commainferior'
|
'periodinferior', 'commainferior'
|
||||||
];
|
];
|
||||||
|
|
||||||
exports.ISOAdobeCharset = ISOAdobeCharset;
|
export {
|
||||||
exports.ExpertCharset = ExpertCharset;
|
ISOAdobeCharset,
|
||||||
exports.ExpertSubsetCharset = ExpertSubsetCharset;
|
ExpertCharset,
|
||||||
}));
|
ExpertSubsetCharset,
|
||||||
|
};
|
||||||
|
@ -13,26 +13,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
arrayByteLength, arraysToBytes, assert, createPromiseCapability, isEmptyObj,
|
||||||
(function (root, factory) {
|
isInt, MissingDataException
|
||||||
if (typeof define === 'function' && define.amd) {
|
} from '../shared/util';
|
||||||
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 arrayByteLength = sharedUtil.arrayByteLength;
|
|
||||||
var arraysToBytes = sharedUtil.arraysToBytes;
|
|
||||||
var assert = sharedUtil.assert;
|
|
||||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
|
||||||
var isInt = sharedUtil.isInt;
|
|
||||||
var isEmptyObj = sharedUtil.isEmptyObj;
|
|
||||||
|
|
||||||
var ChunkedStream = (function ChunkedStreamClosure() {
|
var ChunkedStream = (function ChunkedStreamClosure() {
|
||||||
function ChunkedStream(length, chunkSize, manager) {
|
function ChunkedStream(length, chunkSize, manager) {
|
||||||
@ -578,6 +562,7 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
|||||||
return ChunkedStreamManager;
|
return ChunkedStreamManager;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.ChunkedStream = ChunkedStream;
|
export {
|
||||||
exports.ChunkedStreamManager = ChunkedStreamManager;
|
ChunkedStream,
|
||||||
}));
|
ChunkedStreamManager,
|
||||||
|
};
|
||||||
|
@ -13,36 +13,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, CMapCompressionType, error, isInt, isString, MissingDataException,
|
||||||
(function (root, factory) {
|
Util, warn
|
||||||
if (typeof define === 'function' && define.amd) {
|
} from '../shared/util';
|
||||||
define('pdfjs/core/cmap', ['exports', 'pdfjs/shared/util',
|
import { isCmd, isEOF, isName, isStream } from './primitives';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/parser'],
|
import { Lexer } from './parser';
|
||||||
factory);
|
import { Stream } from './stream';
|
||||||
} 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 warn = sharedUtil.warn;
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
var isInt = sharedUtil.isInt;
|
|
||||||
var isString = sharedUtil.isString;
|
|
||||||
var MissingDataException = sharedUtil.MissingDataException;
|
|
||||||
var CMapCompressionType = sharedUtil.CMapCompressionType;
|
|
||||||
var isEOF = corePrimitives.isEOF;
|
|
||||||
var isName = corePrimitives.isName;
|
|
||||||
var isCmd = corePrimitives.isCmd;
|
|
||||||
var isStream = corePrimitives.isStream;
|
|
||||||
var Stream = coreStream.Stream;
|
|
||||||
var Lexer = coreParser.Lexer;
|
|
||||||
|
|
||||||
var BUILT_IN_CMAPS = [
|
var BUILT_IN_CMAPS = [
|
||||||
// << Start unicode maps.
|
// << Start unicode maps.
|
||||||
@ -1010,7 +987,8 @@ var CMapFactory = (function CMapFactoryClosure() {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.CMap = CMap;
|
export {
|
||||||
exports.CMapFactory = CMapFactory;
|
CMap,
|
||||||
exports.IdentityCMap = IdentityCMap;
|
IdentityCMap,
|
||||||
}));
|
CMapFactory,
|
||||||
|
};
|
||||||
|
@ -13,32 +13,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { error, info, isArray, isString, shadow, warn } from '../shared/util';
|
||||||
|
import { isDict, isName, isStream } from './primitives';
|
||||||
(function (root, factory) {
|
import { PDFFunction } from './function';
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/colorspace', ['exports', 'pdfjs/shared/util',
|
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/function'],
|
|
||||||
factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
|
||||||
require('./function.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreColorSpace = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCorePrimitives, root.pdfjsCoreFunction);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, corePrimitives, coreFunction) {
|
|
||||||
|
|
||||||
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 ColorSpace = (function ColorSpaceClosure() {
|
var ColorSpace = (function ColorSpaceClosure() {
|
||||||
/**
|
/**
|
||||||
@ -1309,5 +1286,6 @@ var LabCS = (function LabCSClosure() {
|
|||||||
return LabCS;
|
return LabCS;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.ColorSpace = ColorSpace;
|
export {
|
||||||
}));
|
ColorSpace,
|
||||||
|
};
|
||||||
|
@ -13,34 +13,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, bytesToString, error, isInt, PasswordException, PasswordResponses,
|
||||||
(function (root, factory) {
|
stringToBytes, utf8StringToString, warn
|
||||||
if (typeof define === 'function' && define.amd) {
|
} from '../shared/util';
|
||||||
define('pdfjs/core/crypto', ['exports', 'pdfjs/shared/util',
|
import { isDict, isName, Name } from './primitives';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream'], factory);
|
import { DecryptStream } from './stream';
|
||||||
} 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 warn = sharedUtil.warn;
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
var assert = sharedUtil.assert;
|
|
||||||
var isInt = sharedUtil.isInt;
|
|
||||||
var stringToBytes = sharedUtil.stringToBytes;
|
|
||||||
var utf8StringToString = sharedUtil.utf8StringToString;
|
|
||||||
var Name = corePrimitives.Name;
|
|
||||||
var isName = corePrimitives.isName;
|
|
||||||
var isDict = corePrimitives.isDict;
|
|
||||||
var DecryptStream = coreStream.DecryptStream;
|
|
||||||
|
|
||||||
var ARCFourCipher = (function ARCFourCipherClosure() {
|
var ARCFourCipher = (function ARCFourCipherClosure() {
|
||||||
function ARCFourCipher(key) {
|
function ARCFourCipher(key) {
|
||||||
@ -2070,14 +2048,15 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
|||||||
return CipherTransformFactory;
|
return CipherTransformFactory;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.AES128Cipher = AES128Cipher;
|
export {
|
||||||
exports.AES256Cipher = AES256Cipher;
|
AES128Cipher,
|
||||||
exports.ARCFourCipher = ARCFourCipher;
|
AES256Cipher,
|
||||||
exports.CipherTransformFactory = CipherTransformFactory;
|
ARCFourCipher,
|
||||||
exports.PDF17 = PDF17;
|
CipherTransformFactory,
|
||||||
exports.PDF20 = PDF20;
|
PDF17,
|
||||||
exports.calculateMD5 = calculateMD5;
|
PDF20,
|
||||||
exports.calculateSHA256 = calculateSHA256;
|
calculateMD5,
|
||||||
exports.calculateSHA384 = calculateSHA384;
|
calculateSHA256,
|
||||||
exports.calculateSHA512 = calculateSHA512;
|
calculateSHA384,
|
||||||
}));
|
calculateSHA512,
|
||||||
|
};
|
||||||
|
@ -13,58 +13,18 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, error, info, isArray, isArrayBuffer, isNum, isSpace, isString,
|
||||||
(function (root, factory) {
|
MissingDataException, OPS, shadow, stringToBytes, stringToPDFString, Util,
|
||||||
if (typeof define === 'function' && define.amd) {
|
warn
|
||||||
define('pdfjs/core/document', ['exports', 'pdfjs/shared/util',
|
} from '../shared/util';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/obj',
|
import { Catalog, ObjectLoader, XRef } from './obj';
|
||||||
'pdfjs/core/parser', 'pdfjs/core/crypto', 'pdfjs/core/evaluator',
|
import { Dict, isDict, isName, isStream } from './primitives';
|
||||||
'pdfjs/core/annotation'], factory);
|
import { NullStream, Stream, StreamsSequenceStream } from './stream';
|
||||||
} else if (typeof exports !== 'undefined') {
|
import { OperatorList, PartialEvaluator } from './evaluator';
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
import { AnnotationFactory } from './annotation';
|
||||||
require('./stream.js'), require('./obj.js'), require('./parser.js'),
|
import { calculateMD5 } from './crypto';
|
||||||
require('./crypto.js'), require('./evaluator.js'),
|
import { Linearization } from './parser';
|
||||||
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 OPS = sharedUtil.OPS;
|
|
||||||
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 isNum = sharedUtil.isNum;
|
|
||||||
var isString = sharedUtil.isString;
|
|
||||||
var shadow = sharedUtil.shadow;
|
|
||||||
var stringToBytes = sharedUtil.stringToBytes;
|
|
||||||
var stringToPDFString = sharedUtil.stringToPDFString;
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var isSpace = sharedUtil.isSpace;
|
|
||||||
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 Linearization = coreParser.Linearization;
|
|
||||||
var calculateMD5 = coreCrypto.calculateMD5;
|
|
||||||
var OperatorList = coreEvaluator.OperatorList;
|
|
||||||
var PartialEvaluator = coreEvaluator.PartialEvaluator;
|
|
||||||
var AnnotationFactory = coreAnnotation.AnnotationFactory;
|
|
||||||
|
|
||||||
var Page = (function PageClosure() {
|
var Page = (function PageClosure() {
|
||||||
|
|
||||||
@ -648,6 +608,7 @@ var PDFDocument = (function PDFDocumentClosure() {
|
|||||||
return PDFDocument;
|
return PDFDocument;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.Page = Page;
|
export {
|
||||||
exports.PDFDocument = PDFDocument;
|
Page,
|
||||||
}));
|
PDFDocument,
|
||||||
|
};
|
||||||
|
@ -13,19 +13,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
var ExpertEncoding = [
|
||||||
|
|
||||||
(function (root, factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/encodings', ['exports'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports);
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreEncodings = {}));
|
|
||||||
}
|
|
||||||
}(this, function (exports) {
|
|
||||||
|
|
||||||
var ExpertEncoding = [
|
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle',
|
'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle',
|
||||||
@ -68,7 +56,7 @@
|
|||||||
'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
|
'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
|
||||||
'Ydieresissmall'];
|
'Ydieresissmall'];
|
||||||
|
|
||||||
var MacExpertEncoding = [
|
var MacExpertEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle',
|
'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle',
|
||||||
@ -110,7 +98,7 @@
|
|||||||
'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
|
'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
|
||||||
'periodsuperior', 'Dotaccentsmall', 'Ringsmall'];
|
'periodsuperior', 'Dotaccentsmall', 'Ringsmall'];
|
||||||
|
|
||||||
var MacRomanEncoding = [
|
var MacRomanEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
||||||
@ -146,7 +134,7 @@
|
|||||||
'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
|
'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
|
||||||
'ogonek', 'caron'];
|
'ogonek', 'caron'];
|
||||||
|
|
||||||
var StandardEncoding = [
|
var StandardEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
||||||
@ -173,7 +161,7 @@
|
|||||||
'', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae',
|
'', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae',
|
||||||
'', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'];
|
'', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'];
|
||||||
|
|
||||||
var WinAnsiEncoding = [
|
var WinAnsiEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
||||||
@ -209,7 +197,7 @@
|
|||||||
'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
|
'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
|
||||||
'ydieresis'];
|
'ydieresis'];
|
||||||
|
|
||||||
var SymbolSetEncoding = [
|
var SymbolSetEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'exclam', 'universal', 'numbersign', 'existential', 'percent',
|
'space', 'exclam', 'universal', 'numbersign', 'existential', 'percent',
|
||||||
@ -247,7 +235,7 @@
|
|||||||
'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
|
'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
|
||||||
'bracerightbt'];
|
'bracerightbt'];
|
||||||
|
|
||||||
var ZapfDingbatsEncoding = [
|
var ZapfDingbatsEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'space', 'a1', 'a2', 'a202', 'a3', 'a4', 'a5', 'a119', 'a118', 'a117',
|
'space', 'a1', 'a2', 'a202', 'a3', 'a4', 'a5', 'a119', 'a118', 'a117',
|
||||||
@ -273,7 +261,7 @@
|
|||||||
'a199', 'a181', 'a200', 'a182', '', 'a201', 'a183', 'a184', 'a197', 'a185',
|
'a199', 'a181', 'a200', 'a182', '', 'a201', 'a183', 'a184', 'a197', 'a185',
|
||||||
'a194', 'a198', 'a186', 'a195', 'a187', 'a188', 'a189', 'a190', 'a191'];
|
'a194', 'a198', 'a186', 'a195', 'a187', 'a188', 'a189', 'a190', 'a191'];
|
||||||
|
|
||||||
function getEncoding(encodingName) {
|
function getEncoding(encodingName) {
|
||||||
switch (encodingName) {
|
switch (encodingName) {
|
||||||
case 'WinAnsiEncoding':
|
case 'WinAnsiEncoding':
|
||||||
return WinAnsiEncoding;
|
return WinAnsiEncoding;
|
||||||
@ -292,13 +280,14 @@
|
|||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.WinAnsiEncoding = WinAnsiEncoding;
|
export {
|
||||||
exports.StandardEncoding = StandardEncoding;
|
WinAnsiEncoding,
|
||||||
exports.MacRomanEncoding = MacRomanEncoding;
|
StandardEncoding,
|
||||||
exports.SymbolSetEncoding = SymbolSetEncoding;
|
MacRomanEncoding,
|
||||||
exports.ZapfDingbatsEncoding = ZapfDingbatsEncoding;
|
SymbolSetEncoding,
|
||||||
exports.ExpertEncoding = ExpertEncoding;
|
ZapfDingbatsEncoding,
|
||||||
exports.getEncoding = getEncoding;
|
ExpertEncoding,
|
||||||
}));
|
getEncoding,
|
||||||
|
};
|
||||||
|
@ -13,101 +13,39 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, CMapCompressionType, createPromiseCapability, error,
|
||||||
(function (root, factory) {
|
FONT_IDENTITY_MATRIX, getLookupTableFactory, IDENTITY_MATRIX, ImageKind, info,
|
||||||
if (typeof define === 'function' && define.amd) {
|
isArray, isNum, isString, NativeImageDecoding, OPS, TextRenderingMode,
|
||||||
define('pdfjs/core/evaluator', ['exports', 'pdfjs/shared/util',
|
UNSUPPORTED_FEATURES, Util, warn
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/parser',
|
} from '../shared/util';
|
||||||
'pdfjs/core/image', 'pdfjs/core/colorspace', 'pdfjs/core/murmurhash3',
|
import { CMapFactory, IdentityCMap } from './cmap';
|
||||||
'pdfjs/core/fonts', 'pdfjs/core/function', 'pdfjs/core/pattern',
|
import { DecodeStream, JpegStream, Stream } from './stream';
|
||||||
'pdfjs/core/cmap', 'pdfjs/core/metrics', 'pdfjs/core/bidi',
|
import {
|
||||||
'pdfjs/core/encodings', 'pdfjs/core/standard_fonts',
|
Dict, isCmd, isDict, isEOF, isName, isRef, isStream, Name
|
||||||
'pdfjs/core/unicode', 'pdfjs/core/glyphlist'], factory);
|
} from './primitives';
|
||||||
} else if (typeof exports !== 'undefined') {
|
import {
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
ErrorFont, Font, FontFlags, getFontType, IdentityToUnicodeMap, ToUnicodeMap
|
||||||
require('./stream.js'), require('./parser.js'), require('./image.js'),
|
} from './fonts';
|
||||||
require('./colorspace.js'), require('./murmurhash3.js'),
|
import {
|
||||||
require('./fonts.js'), require('./function.js'), require('./pattern.js'),
|
getEncoding, MacRomanEncoding, StandardEncoding, SymbolSetEncoding,
|
||||||
require('./cmap.js'), require('./metrics.js'), require('./bidi.js'),
|
WinAnsiEncoding, ZapfDingbatsEncoding
|
||||||
require('./encodings.js'), require('./standard_fonts.js'),
|
} from './encodings';
|
||||||
require('./unicode.js'), require('./glyphlist.js'));
|
import {
|
||||||
} else {
|
getNormalizedUnicodes, getUnicodeForGlyph, reverseIfRtl
|
||||||
factory((root.pdfjsCoreEvaluator = {}), root.pdfjsSharedUtil,
|
} from './unicode';
|
||||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreParser,
|
import {
|
||||||
root.pdfjsCoreImage, root.pdfjsCoreColorSpace, root.pdfjsCoreMurmurHash3,
|
getSerifFonts, getStdFontMap, getSymbolsFonts
|
||||||
root.pdfjsCoreFonts, root.pdfjsCoreFunction, root.pdfjsCorePattern,
|
} from './standard_fonts';
|
||||||
root.pdfjsCoreCMap, root.pdfjsCoreMetrics, root.pdfjsCoreBidi,
|
import { getTilingPatternIR, Pattern } from './pattern';
|
||||||
root.pdfjsCoreEncodings, root.pdfjsCoreStandardFonts,
|
import { isPDFFunction, PDFFunction } from './function';
|
||||||
root.pdfjsCoreUnicode, root.pdfjsCoreGlyphList);
|
import { Lexer, Parser } from './parser';
|
||||||
}
|
import { bidi } from './bidi';
|
||||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream, coreParser,
|
import { ColorSpace } from './colorspace';
|
||||||
coreImage, coreColorSpace, coreMurmurHash3, coreFonts,
|
import { getGlyphsUnicode } from './glyphlist';
|
||||||
coreFunction, corePattern, coreCMap, coreMetrics, coreBidi,
|
import { getMetrics } from './metrics';
|
||||||
coreEncodings, coreStandardFonts, coreUnicode,
|
import { MurmurHash3_64 } from './murmurhash3';
|
||||||
coreGlyphList) {
|
import { PDFImage } from './image';
|
||||||
|
|
||||||
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 NativeImageDecoding = sharedUtil.NativeImageDecoding;
|
|
||||||
var TextRenderingMode = sharedUtil.TextRenderingMode;
|
|
||||||
var CMapCompressionType = sharedUtil.CMapCompressionType;
|
|
||||||
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 getLookupTableFactory = sharedUtil.getLookupTableFactory;
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var Dict = corePrimitives.Dict;
|
|
||||||
var Name = corePrimitives.Name;
|
|
||||||
var isEOF = corePrimitives.isEOF;
|
|
||||||
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 Stream = coreStream.Stream;
|
|
||||||
var Lexer = coreParser.Lexer;
|
|
||||||
var Parser = coreParser.Parser;
|
|
||||||
var PDFImage = coreImage.PDFImage;
|
|
||||||
var ColorSpace = coreColorSpace.ColorSpace;
|
|
||||||
var MurmurHash3_64 = coreMurmurHash3.MurmurHash3_64;
|
|
||||||
var ErrorFont = coreFonts.ErrorFont;
|
|
||||||
var FontFlags = coreFonts.FontFlags;
|
|
||||||
var Font = coreFonts.Font;
|
|
||||||
var IdentityToUnicodeMap = coreFonts.IdentityToUnicodeMap;
|
|
||||||
var ToUnicodeMap = coreFonts.ToUnicodeMap;
|
|
||||||
var getFontType = coreFonts.getFontType;
|
|
||||||
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 getMetrics = coreMetrics.getMetrics;
|
|
||||||
var bidi = coreBidi.bidi;
|
|
||||||
var WinAnsiEncoding = coreEncodings.WinAnsiEncoding;
|
|
||||||
var StandardEncoding = coreEncodings.StandardEncoding;
|
|
||||||
var MacRomanEncoding = coreEncodings.MacRomanEncoding;
|
|
||||||
var SymbolSetEncoding = coreEncodings.SymbolSetEncoding;
|
|
||||||
var ZapfDingbatsEncoding = coreEncodings.ZapfDingbatsEncoding;
|
|
||||||
var getEncoding = coreEncodings.getEncoding;
|
|
||||||
var getStdFontMap = coreStandardFonts.getStdFontMap;
|
|
||||||
var getSerifFonts = coreStandardFonts.getSerifFonts;
|
|
||||||
var getSymbolsFonts = coreStandardFonts.getSymbolsFonts;
|
|
||||||
var getNormalizedUnicodes = coreUnicode.getNormalizedUnicodes;
|
|
||||||
var reverseIfRtl = coreUnicode.reverseIfRtl;
|
|
||||||
var getUnicodeForGlyph = coreUnicode.getUnicodeForGlyph;
|
|
||||||
var getGlyphsUnicode = coreGlyphList.getGlyphsUnicode;
|
|
||||||
|
|
||||||
var PartialEvaluator = (function PartialEvaluatorClosure() {
|
var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||||
const DefaultPartialEvaluatorOptions = {
|
const DefaultPartialEvaluatorOptions = {
|
||||||
@ -3439,6 +3377,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
|
|||||||
return QueueOptimizer;
|
return QueueOptimizer;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.OperatorList = OperatorList;
|
export {
|
||||||
exports.PartialEvaluator = PartialEvaluator;
|
OperatorList,
|
||||||
}));
|
PartialEvaluator,
|
||||||
|
};
|
||||||
|
@ -13,31 +13,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { bytesToString, error, Util } from '../shared/util';
|
||||||
(function (root, factory) {
|
import { CFFParser } from './cff_parser';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import { getGlyphsUnicode } from './glyphlist';
|
||||||
define('pdfjs/core/font_renderer', ['exports', 'pdfjs/shared/util',
|
import { StandardEncoding } from './encodings';
|
||||||
'pdfjs/core/stream', 'pdfjs/core/glyphlist', 'pdfjs/core/encodings',
|
import { Stream } from './stream';
|
||||||
'pdfjs/core/cff_parser'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'), require('./stream.js'),
|
|
||||||
require('./glyphlist.js'), require('./encodings.js'),
|
|
||||||
require('./cff_parser.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreFontRenderer = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCoreStream, root.pdfjsCoreGlyphList, root.pdfjsCoreEncodings,
|
|
||||||
root.pdfjsCoreCFFParser);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, coreStream, coreGlyphList,
|
|
||||||
coreEncodings, coreCFFParser) {
|
|
||||||
|
|
||||||
var Util = sharedUtil.Util;
|
|
||||||
var bytesToString = sharedUtil.bytesToString;
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
var Stream = coreStream.Stream;
|
|
||||||
var getGlyphsUnicode = coreGlyphList.getGlyphsUnicode;
|
|
||||||
var StandardEncoding = coreEncodings.StandardEncoding;
|
|
||||||
var CFFParser = coreCFFParser.CFFParser;
|
|
||||||
|
|
||||||
var FontRendererFactory = (function FontRendererFactoryClosure() {
|
var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||||
function getLong(data, offset) {
|
function getLong(data, offset) {
|
||||||
@ -735,5 +715,6 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.FontRendererFactory = FontRendererFactory;
|
export {
|
||||||
}));
|
FontRendererFactory,
|
||||||
|
};
|
||||||
|
@ -13,76 +13,30 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, bytesToString, error, FONT_IDENTITY_MATRIX, FontType, info, isArray,
|
||||||
(function (root, factory) {
|
isInt, isNum, isSpace, MissingDataException, readUint32, shadow, string32,
|
||||||
if (typeof define === 'function' && define.amd) {
|
warn
|
||||||
define('pdfjs/core/fonts', ['exports', 'pdfjs/shared/util',
|
} from '../shared/util';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream', 'pdfjs/core/glyphlist',
|
import {
|
||||||
'pdfjs/core/font_renderer', 'pdfjs/core/encodings',
|
CFF, CFFCharset, CFFCompiler, CFFHeader, CFFIndex, CFFParser, CFFPrivateDict,
|
||||||
'pdfjs/core/standard_fonts', 'pdfjs/core/unicode',
|
CFFStandardStrings, CFFStrings, CFFTopDict
|
||||||
'pdfjs/core/type1_parser', 'pdfjs/core/cff_parser'], factory);
|
} from './cff_parser';
|
||||||
} else if (typeof exports !== 'undefined') {
|
import { getDingbatsGlyphsUnicode, getGlyphsUnicode } from './glyphlist';
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
import {
|
||||||
require('./stream.js'), require('./glyphlist.js'),
|
getEncoding, MacRomanEncoding, StandardEncoding, SymbolSetEncoding,
|
||||||
require('./font_renderer.js'), require('./encodings.js'),
|
ZapfDingbatsEncoding
|
||||||
require('./standard_fonts.js'), require('./unicode.js'),
|
} from './encodings';
|
||||||
require('./type1_parser.js'), require('./cff_parser.js'));
|
import {
|
||||||
} else {
|
getGlyphMapForStandardFonts, getNonStdFontMap, getStdFontMap,
|
||||||
factory((root.pdfjsCoreFonts = {}), root.pdfjsSharedUtil,
|
getSupplementalGlyphMapForArialBlack
|
||||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream, root.pdfjsCoreGlyphList,
|
} from './standard_fonts';
|
||||||
root.pdfjsCoreFontRenderer, root.pdfjsCoreEncodings,
|
import {
|
||||||
root.pdfjsCoreStandardFonts, root.pdfjsCoreUnicode,
|
getUnicodeForGlyph, getUnicodeRangeFor, mapSpecialUnicodeValues
|
||||||
root.pdfjsCoreType1Parser, root.pdfjsCoreCFFParser);
|
} from './unicode';
|
||||||
}
|
import { FontRendererFactory } from './font_renderer';
|
||||||
}(this, function (exports, sharedUtil, corePrimitives, coreStream,
|
import { Stream } from './stream';
|
||||||
coreGlyphList, coreFontRenderer, coreEncodings,
|
import { Type1Parser } from './type1_parser';
|
||||||
coreStandardFonts, coreUnicode, coreType1Parser,
|
|
||||||
coreCFFParser) {
|
|
||||||
|
|
||||||
var FONT_IDENTITY_MATRIX = sharedUtil.FONT_IDENTITY_MATRIX;
|
|
||||||
var FontType = sharedUtil.FontType;
|
|
||||||
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 string32 = sharedUtil.string32;
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var MissingDataException = sharedUtil.MissingDataException;
|
|
||||||
var isSpace = sharedUtil.isSpace;
|
|
||||||
var Stream = coreStream.Stream;
|
|
||||||
var getGlyphsUnicode = coreGlyphList.getGlyphsUnicode;
|
|
||||||
var getDingbatsGlyphsUnicode = coreGlyphList.getDingbatsGlyphsUnicode;
|
|
||||||
var FontRendererFactory = coreFontRenderer.FontRendererFactory;
|
|
||||||
var StandardEncoding = coreEncodings.StandardEncoding;
|
|
||||||
var MacRomanEncoding = coreEncodings.MacRomanEncoding;
|
|
||||||
var SymbolSetEncoding = coreEncodings.SymbolSetEncoding;
|
|
||||||
var ZapfDingbatsEncoding = coreEncodings.ZapfDingbatsEncoding;
|
|
||||||
var getEncoding = coreEncodings.getEncoding;
|
|
||||||
var getStdFontMap = coreStandardFonts.getStdFontMap;
|
|
||||||
var getNonStdFontMap = coreStandardFonts.getNonStdFontMap;
|
|
||||||
var getGlyphMapForStandardFonts = coreStandardFonts.getGlyphMapForStandardFonts;
|
|
||||||
var getSupplementalGlyphMapForArialBlack =
|
|
||||||
coreStandardFonts.getSupplementalGlyphMapForArialBlack;
|
|
||||||
var getUnicodeRangeFor = coreUnicode.getUnicodeRangeFor;
|
|
||||||
var mapSpecialUnicodeValues = coreUnicode.mapSpecialUnicodeValues;
|
|
||||||
var getUnicodeForGlyph = coreUnicode.getUnicodeForGlyph;
|
|
||||||
var Type1Parser = coreType1Parser.Type1Parser;
|
|
||||||
var CFFStandardStrings = coreCFFParser.CFFStandardStrings;
|
|
||||||
var CFFParser = coreCFFParser.CFFParser;
|
|
||||||
var CFFCompiler = coreCFFParser.CFFCompiler;
|
|
||||||
var CFF = coreCFFParser.CFF;
|
|
||||||
var CFFHeader = coreCFFParser.CFFHeader;
|
|
||||||
var CFFTopDict = coreCFFParser.CFFTopDict;
|
|
||||||
var CFFPrivateDict = coreCFFParser.CFFPrivateDict;
|
|
||||||
var CFFStrings = coreCFFParser.CFFStrings;
|
|
||||||
var CFFIndex = coreCFFParser.CFFIndex;
|
|
||||||
var CFFCharset = coreCFFParser.CFFCharset;
|
|
||||||
|
|
||||||
// Unicode Private Use Area
|
// Unicode Private Use Area
|
||||||
var PRIVATE_USE_OFFSET_START = 0xE000;
|
var PRIVATE_USE_OFFSET_START = 0xE000;
|
||||||
@ -3376,14 +3330,15 @@ var CFFFont = (function CFFFontClosure() {
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.SEAC_ANALYSIS_ENABLED = SEAC_ANALYSIS_ENABLED;
|
export {
|
||||||
exports.PRIVATE_USE_OFFSET_START = PRIVATE_USE_OFFSET_START;
|
SEAC_ANALYSIS_ENABLED,
|
||||||
exports.PRIVATE_USE_OFFSET_END = PRIVATE_USE_OFFSET_END;
|
PRIVATE_USE_OFFSET_START,
|
||||||
exports.ErrorFont = ErrorFont;
|
PRIVATE_USE_OFFSET_END,
|
||||||
exports.Font = Font;
|
ErrorFont,
|
||||||
exports.FontFlags = FontFlags;
|
Font,
|
||||||
exports.IdentityToUnicodeMap = IdentityToUnicodeMap;
|
FontFlags,
|
||||||
exports.ProblematicCharRanges = ProblematicCharRanges;
|
ToUnicodeMap,
|
||||||
exports.ToUnicodeMap = ToUnicodeMap;
|
IdentityToUnicodeMap,
|
||||||
exports.getFontType = getFontType;
|
ProblematicCharRanges,
|
||||||
}));
|
getFontType,
|
||||||
|
};
|
||||||
|
@ -13,29 +13,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { error, info, isArray, isBool } from '../shared/util';
|
||||||
|
import { isDict, isStream } from './primitives';
|
||||||
(function (root, factory) {
|
import { PostScriptLexer, PostScriptParser } from './ps_parser';
|
||||||
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 PDFFunction = (function PDFFunctionClosure() {
|
||||||
var CONSTRUCT_SAMPLED = 0;
|
var CONSTRUCT_SAMPLED = 0;
|
||||||
@ -1152,8 +1132,9 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|||||||
return PostScriptCompiler;
|
return PostScriptCompiler;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.isPDFFunction = isPDFFunction;
|
export {
|
||||||
exports.PDFFunction = PDFFunction;
|
isPDFFunction,
|
||||||
exports.PostScriptEvaluator = PostScriptEvaluator;
|
PDFFunction,
|
||||||
exports.PostScriptCompiler = PostScriptCompiler;
|
PostScriptEvaluator,
|
||||||
}));
|
PostScriptCompiler,
|
||||||
|
};
|
||||||
|
@ -14,18 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
/* no-babel-preset */
|
/* no-babel-preset */
|
||||||
|
|
||||||
'use strict';
|
var getLookupTableFactory = require('../shared/util').getLookupTableFactory;
|
||||||
|
|
||||||
(function (root, factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/glyphlist', ['exports', 'pdfjs/shared/util'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreGlyphList = {}), root.pdfjsSharedUtil);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil) {
|
|
||||||
var getLookupTableFactory = sharedUtil.getLookupTableFactory;
|
|
||||||
|
|
||||||
var getGlyphsUnicode = getLookupTableFactory(function (t) {
|
var getGlyphsUnicode = getLookupTableFactory(function (t) {
|
||||||
t['A'] = 0x0041;
|
t['A'] = 0x0041;
|
||||||
@ -4561,4 +4550,3 @@ var getDingbatsGlyphsUnicode = getLookupTableFactory(function (t) {
|
|||||||
|
|
||||||
exports.getGlyphsUnicode = getGlyphsUnicode;
|
exports.getGlyphsUnicode = getGlyphsUnicode;
|
||||||
exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode;
|
exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode;
|
||||||
}));
|
|
||||||
|
@ -13,37 +13,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { assert, error, ImageKind, info, isArray, warn } from '../shared/util';
|
||||||
|
import { DecodeStream, JpegStream } from './stream';
|
||||||
(function (root, factory) {
|
import { isStream, Name } from './primitives';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import { ColorSpace } from './colorspace';
|
||||||
define('pdfjs/core/image', ['exports', 'pdfjs/shared/util',
|
import { JpxImage } from './jpx';
|
||||||
'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 JpegStream = coreStream.JpegStream;
|
|
||||||
var JpxImage = coreJpx.JpxImage;
|
|
||||||
|
|
||||||
var PDFImage = (function PDFImageClosure() {
|
var PDFImage = (function PDFImageClosure() {
|
||||||
/**
|
/**
|
||||||
@ -664,5 +638,6 @@ var PDFImage = (function PDFImageClosure() {
|
|||||||
return PDFImage;
|
return PDFImage;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.PDFImage = PDFImage;
|
export {
|
||||||
}));
|
PDFImage,
|
||||||
|
};
|
||||||
|
@ -13,28 +13,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
error, log2, readInt8, readUint16, readUint32, shadow
|
||||||
(function (root, factory) {
|
} from '../shared/util';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import { ArithmeticDecoder } from './arithmetic_decoder';
|
||||||
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() {
|
var Jbig2Image = (function Jbig2ImageClosure() {
|
||||||
// Utility data structures
|
// Utility data structures
|
||||||
@ -1102,5 +1084,6 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
|||||||
return Jbig2Image;
|
return Jbig2Image;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.Jbig2Image = Jbig2Image;
|
export {
|
||||||
}));
|
Jbig2Image,
|
||||||
|
};
|
||||||
|
@ -14,20 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
/* eslint-disable no-multi-spaces */
|
/* eslint-disable no-multi-spaces */
|
||||||
|
|
||||||
'use strict';
|
import { error, warn } from '../shared/util';
|
||||||
|
|
||||||
(function (root, factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/jpg', ['exports', 'pdfjs/shared/util'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreJpg = {}), root.pdfjsSharedUtil);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil) {
|
|
||||||
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This code was forked from https://github.com/notmasteryet/jpgjs.
|
* This code was forked from https://github.com/notmasteryet/jpgjs.
|
||||||
@ -1138,5 +1125,6 @@ var JpegImage = (function JpegImageClosure() {
|
|||||||
return JpegImage;
|
return JpegImage;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.JpegImage = JpegImage;
|
export {
|
||||||
}));
|
JpegImage,
|
||||||
|
};
|
||||||
|
@ -13,28 +13,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
error, info, log2, readUint16, readUint32, warn
|
||||||
(function (root, factory) {
|
} from '../shared/util';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import { ArithmeticDecoder } from './arithmetic_decoder';
|
||||||
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 warn = sharedUtil.warn;
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
var log2 = sharedUtil.log2;
|
|
||||||
var readUint16 = sharedUtil.readUint16;
|
|
||||||
var readUint32 = sharedUtil.readUint32;
|
|
||||||
var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder;
|
|
||||||
|
|
||||||
var JpxImage = (function JpxImageClosure() {
|
var JpxImage = (function JpxImageClosure() {
|
||||||
// Table E.1
|
// Table E.1
|
||||||
@ -2227,5 +2209,6 @@ var JpxImage = (function JpxImageClosure() {
|
|||||||
return JpxImage;
|
return JpxImage;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.JpxImage = JpxImage;
|
export {
|
||||||
}));
|
JpxImage,
|
||||||
|
};
|
||||||
|
@ -13,18 +13,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { getLookupTableFactory } from '../shared/util';
|
||||||
|
|
||||||
(function (root, factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/metrics', ['exports', 'pdfjs/shared/util'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreMetrics = {}), root.pdfjsSharedUtil);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil) {
|
|
||||||
var getLookupTableFactory = sharedUtil.getLookupTableFactory;
|
|
||||||
|
|
||||||
// The Metrics object contains glyph widths (in glyph space units).
|
// The Metrics object contains glyph widths (in glyph space units).
|
||||||
// As per PDF spec, for most fonts (Type 3 being an exception) a glyph
|
// As per PDF spec, for most fonts (Type 3 being an exception) a glyph
|
||||||
@ -2968,5 +2957,6 @@ var getMetrics = getLookupTableFactory(function (t) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.getMetrics = getMetrics;
|
export {
|
||||||
}));
|
getMetrics,
|
||||||
|
};
|
||||||
|
@ -17,18 +17,6 @@
|
|||||||
* Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
|
* Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'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 MurmurHash3_64 = (function MurmurHash3_64Closure(seed) {
|
var MurmurHash3_64 = (function MurmurHash3_64Closure(seed) {
|
||||||
// Workaround for missing math precision in JS.
|
// Workaround for missing math precision in JS.
|
||||||
var MASK_HIGH = 0xffff0000;
|
var MASK_HIGH = 0xffff0000;
|
||||||
@ -152,5 +140,6 @@ var MurmurHash3_64 = (function MurmurHash3_64Closure(seed) {
|
|||||||
return MurmurHash3_64;
|
return MurmurHash3_64;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.MurmurHash3_64 = MurmurHash3_64;
|
export {
|
||||||
}));
|
MurmurHash3_64,
|
||||||
|
};
|
||||||
|
@ -13,30 +13,21 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, createPromiseCapability, globalScope, isInt, MissingPDFException,
|
||||||
|
UnexpectedResponseException
|
||||||
|
} from '../shared/util';
|
||||||
|
import { setPDFNetworkStreamClass } from './worker';
|
||||||
|
|
||||||
(function (root, factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/network', ['exports', 'pdfjs/shared/util',
|
|
||||||
'pdfjs/core/worker'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'), require('./worker.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreNetwork = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCoreWorker);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, coreWorker) {
|
|
||||||
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
||||||
throw new Error('Module "pdfjs/core/network" shall not ' +
|
throw new Error('Module "./network" shall not ' +
|
||||||
'be used with FIREFOX or MOZCENTRAL build.');
|
'be used with FIREFOX or MOZCENTRAL build.');
|
||||||
}
|
}
|
||||||
|
|
||||||
var globalScope = sharedUtil.globalScope;
|
var OK_RESPONSE = 200;
|
||||||
|
var PARTIAL_CONTENT_RESPONSE = 206;
|
||||||
|
|
||||||
var OK_RESPONSE = 200;
|
function NetworkManager(url, args) {
|
||||||
var PARTIAL_CONTENT_RESPONSE = 206;
|
|
||||||
|
|
||||||
function NetworkManager(url, args) {
|
|
||||||
this.url = url;
|
this.url = url;
|
||||||
args = args || {};
|
args = args || {};
|
||||||
this.isHttp = /^https?:/i.test(url);
|
this.isHttp = /^https?:/i.test(url);
|
||||||
@ -50,9 +41,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
this.currXhrId = 0;
|
this.currXhrId = 0;
|
||||||
this.pendingRequests = Object.create(null);
|
this.pendingRequests = Object.create(null);
|
||||||
this.loadedRequests = Object.create(null);
|
this.loadedRequests = Object.create(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArrayBuffer(xhr) {
|
function getArrayBuffer(xhr) {
|
||||||
var data = xhr.response;
|
var data = xhr.response;
|
||||||
if (typeof data !== 'string') {
|
if (typeof data !== 'string') {
|
||||||
return data;
|
return data;
|
||||||
@ -63,9 +54,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
array[i] = data.charCodeAt(i) & 0xFF;
|
array[i] = data.charCodeAt(i) & 0xFF;
|
||||||
}
|
}
|
||||||
return array.buffer;
|
return array.buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
var supportsMozChunked =
|
var supportsMozChunked =
|
||||||
typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') ? false :
|
typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME') ? false :
|
||||||
(function supportsMozChunkedClosure() {
|
(function supportsMozChunkedClosure() {
|
||||||
try {
|
try {
|
||||||
@ -82,9 +73,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
NetworkManager.prototype = {
|
NetworkManager.prototype = {
|
||||||
requestRange: function NetworkManager_requestRange(begin, end, listeners) {
|
requestRange: function NetworkManager_requestRange(begin, end, listeners) {
|
||||||
var args = {
|
var args = {
|
||||||
begin,
|
begin,
|
||||||
@ -275,16 +266,10 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
delete this.pendingRequests[xhrId];
|
delete this.pendingRequests[xhrId];
|
||||||
xhr.abort();
|
xhr.abort();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var assert = sharedUtil.assert;
|
/** @implements {IPDFStream} */
|
||||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
function PDFNetworkStream(options) {
|
||||||
var isInt = sharedUtil.isInt;
|
|
||||||
var MissingPDFException = sharedUtil.MissingPDFException;
|
|
||||||
var UnexpectedResponseException = sharedUtil.UnexpectedResponseException;
|
|
||||||
|
|
||||||
/** @implements {IPDFStream} */
|
|
||||||
function PDFNetworkStream(options) {
|
|
||||||
this._options = options;
|
this._options = options;
|
||||||
var source = options.source;
|
var source = options.source;
|
||||||
this._manager = new NetworkManager(source.url, {
|
this._manager = new NetworkManager(source.url, {
|
||||||
@ -294,9 +279,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
this._rangeChunkSize = source.rangeChunkSize;
|
this._rangeChunkSize = source.rangeChunkSize;
|
||||||
this._fullRequestReader = null;
|
this._fullRequestReader = null;
|
||||||
this._rangeRequestReaders = [];
|
this._rangeRequestReaders = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
PDFNetworkStream.prototype = {
|
PDFNetworkStream.prototype = {
|
||||||
_onRangeRequestReaderClosed:
|
_onRangeRequestReaderClosed:
|
||||||
function PDFNetworkStream_onRangeRequestReaderClosed(reader) {
|
function PDFNetworkStream_onRangeRequestReaderClosed(reader) {
|
||||||
var i = this._rangeRequestReaders.indexOf(reader);
|
var i = this._rangeRequestReaders.indexOf(reader);
|
||||||
@ -329,10 +314,10 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
reader.cancel(reason);
|
reader.cancel(reason);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @implements {IPDFStreamReader} */
|
/** @implements {IPDFStreamReader} */
|
||||||
function PDFNetworkStreamFullRequestReader(manager, options) {
|
function PDFNetworkStreamFullRequestReader(manager, options) {
|
||||||
this._manager = manager;
|
this._manager = manager;
|
||||||
|
|
||||||
var source = options.source;
|
var source = options.source;
|
||||||
@ -363,9 +348,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
this._storedError = undefined;
|
this._storedError = undefined;
|
||||||
|
|
||||||
this.onProgress = null;
|
this.onProgress = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
PDFNetworkStreamFullRequestReader.prototype = {
|
PDFNetworkStreamFullRequestReader.prototype = {
|
||||||
_validateRangeRequestCapabilities: function
|
_validateRangeRequestCapabilities: function
|
||||||
PDFNetworkStreamFullRequestReader_validateRangeRequestCapabilities() {
|
PDFNetworkStreamFullRequestReader_validateRangeRequestCapabilities() {
|
||||||
|
|
||||||
@ -528,10 +513,10 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
}
|
}
|
||||||
this._fullRequestReader = null;
|
this._fullRequestReader = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @implements {IPDFStreamRangeReader} */
|
/** @implements {IPDFStreamRangeReader} */
|
||||||
function PDFNetworkStreamRangeRequestReader(manager, begin, end) {
|
function PDFNetworkStreamRangeRequestReader(manager, begin, end) {
|
||||||
this._manager = manager;
|
this._manager = manager;
|
||||||
var args = {
|
var args = {
|
||||||
onDone: this._onDone.bind(this),
|
onDone: this._onDone.bind(this),
|
||||||
@ -544,9 +529,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
|
|
||||||
this.onProgress = null;
|
this.onProgress = null;
|
||||||
this.onClosed = null;
|
this.onClosed = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
PDFNetworkStreamRangeRequestReader.prototype = {
|
PDFNetworkStreamRangeRequestReader.prototype = {
|
||||||
_close: function PDFNetworkStreamRangeRequestReader_close() {
|
_close: function PDFNetworkStreamRangeRequestReader_close() {
|
||||||
if (this.onClosed) {
|
if (this.onClosed) {
|
||||||
this.onClosed(this);
|
this.onClosed(this);
|
||||||
@ -606,10 +591,11 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
|
|||||||
}
|
}
|
||||||
this._close();
|
this._close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
coreWorker.setPDFNetworkStreamClass(PDFNetworkStream);
|
setPDFNetworkStreamClass(PDFNetworkStream);
|
||||||
|
|
||||||
exports.PDFNetworkStream = PDFNetworkStream;
|
export {
|
||||||
exports.NetworkManager = NetworkManager;
|
PDFNetworkStream,
|
||||||
}));
|
NetworkManager,
|
||||||
|
};
|
||||||
|
@ -13,58 +13,20 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, bytesToString, createPromiseCapability, createValidAbsoluteUrl, error,
|
||||||
(function (root, factory) {
|
info, InvalidPDFException, isArray, isBool, isInt, isString,
|
||||||
if (typeof define === 'function' && define.amd) {
|
MissingDataException, shadow, stringToPDFString, stringToUTF8String, Util,
|
||||||
define('pdfjs/core/obj', ['exports', 'pdfjs/shared/util',
|
warn, XRefParseException
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/crypto', 'pdfjs/core/parser',
|
} from '../shared/util';
|
||||||
'pdfjs/core/chunked_stream', 'pdfjs/core/colorspace'], factory);
|
import {
|
||||||
} else if (typeof exports !== 'undefined') {
|
Dict, isCmd, isDict, isName, isRef, isRefsEqual, isStream, Ref, RefSet,
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
RefSetCache
|
||||||
require('./crypto.js'), require('./parser.js'),
|
} from './primitives';
|
||||||
require('./chunked_stream.js'), require('./colorspace.js'));
|
import { Lexer, Parser } from './parser';
|
||||||
} else {
|
import { ChunkedStream } from './chunked_stream';
|
||||||
factory((root.pdfjsCoreObj = {}), root.pdfjsSharedUtil,
|
import { CipherTransformFactory } from './crypto';
|
||||||
root.pdfjsCorePrimitives, root.pdfjsCoreCrypto, root.pdfjsCoreParser,
|
import { ColorSpace } from './colorspace';
|
||||||
root.pdfjsCoreChunkedStream, root.pdfjsCoreColorSpace);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, corePrimitives, coreCrypto, coreParser,
|
|
||||||
coreChunkedStream, coreColorSpace) {
|
|
||||||
|
|
||||||
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 isBool = sharedUtil.isBool;
|
|
||||||
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 createValidAbsoluteUrl = sharedUtil.createValidAbsoluteUrl;
|
|
||||||
var Util = sharedUtil.Util;
|
|
||||||
var Dict = corePrimitives.Dict;
|
|
||||||
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 isRefsEqual = corePrimitives.isRefsEqual;
|
|
||||||
var isStream = corePrimitives.isStream;
|
|
||||||
var CipherTransformFactory = coreCrypto.CipherTransformFactory;
|
|
||||||
var Lexer = coreParser.Lexer;
|
|
||||||
var Parser = coreParser.Parser;
|
|
||||||
var ChunkedStream = coreChunkedStream.ChunkedStream;
|
|
||||||
var ColorSpace = coreColorSpace.ColorSpace;
|
|
||||||
|
|
||||||
var Catalog = (function CatalogClosure() {
|
var Catalog = (function CatalogClosure() {
|
||||||
function Catalog(pdfManager, xref, pageFactory) {
|
function Catalog(pdfManager, xref, pageFactory) {
|
||||||
@ -1788,8 +1750,9 @@ var ObjectLoader = (function() {
|
|||||||
return ObjectLoader;
|
return ObjectLoader;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.Catalog = Catalog;
|
export {
|
||||||
exports.ObjectLoader = ObjectLoader;
|
Catalog,
|
||||||
exports.XRef = XRef;
|
ObjectLoader,
|
||||||
exports.FileSpec = FileSpec;
|
XRef,
|
||||||
}));
|
FileSpec,
|
||||||
|
};
|
||||||
|
@ -13,51 +13,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
Ascii85Stream, AsciiHexStream, CCITTFaxStream, FlateStream, Jbig2Stream,
|
||||||
(function (root, factory) {
|
JpegStream, JpxStream, LZWStream, NullStream, PredictorStream, RunLengthStream
|
||||||
if (typeof define === 'function' && define.amd) {
|
} from './stream';
|
||||||
define('pdfjs/core/parser', ['exports', 'pdfjs/shared/util',
|
import {
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/stream'], factory);
|
assert, error, info, isArray, isInt, isNum, isString, MissingDataException,
|
||||||
} else if (typeof exports !== 'undefined') {
|
StreamType, warn
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
} from '../shared/util';
|
||||||
require('./stream.js'));
|
import {
|
||||||
} else {
|
Cmd, Dict, EOF, isCmd, isDict, isEOF, isName, Name, Ref
|
||||||
factory((root.pdfjsCoreParser = {}), root.pdfjsSharedUtil,
|
} from './primitives';
|
||||||
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 EOF = corePrimitives.EOF;
|
|
||||||
var Cmd = corePrimitives.Cmd;
|
|
||||||
var Dict = corePrimitives.Dict;
|
|
||||||
var Name = corePrimitives.Name;
|
|
||||||
var Ref = corePrimitives.Ref;
|
|
||||||
var isEOF = corePrimitives.isEOF;
|
|
||||||
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 MAX_LENGTH_TO_CACHE = 1000;
|
var MAX_LENGTH_TO_CACHE = 1000;
|
||||||
|
|
||||||
@ -1125,7 +1091,8 @@ var Linearization = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.Lexer = Lexer;
|
export {
|
||||||
exports.Linearization = Linearization;
|
Lexer,
|
||||||
exports.Parser = Parser;
|
Linearization,
|
||||||
}));
|
Parser,
|
||||||
|
};
|
||||||
|
@ -14,34 +14,12 @@
|
|||||||
*/
|
*/
|
||||||
/* eslint-disable no-multi-spaces */
|
/* eslint-disable no-multi-spaces */
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
assert, error, info, MissingDataException, UNSUPPORTED_FEATURES, Util, warn
|
||||||
(function (root, factory) {
|
} from '../shared/util';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import { ColorSpace } from './colorspace';
|
||||||
define('pdfjs/core/pattern', ['exports', 'pdfjs/shared/util',
|
import { isStream } from './primitives';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/function',
|
import { PDFFunction } from './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 = {
|
var ShadingType = {
|
||||||
FUNCTION_BASED: 1,
|
FUNCTION_BASED: 1,
|
||||||
@ -830,6 +808,7 @@ function getTilingPatternIR(operatorList, dict, args) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.Pattern = Pattern;
|
export {
|
||||||
exports.getTilingPatternIR = getTilingPatternIR;
|
Pattern,
|
||||||
}));
|
getTilingPatternIR,
|
||||||
|
};
|
||||||
|
@ -13,34 +13,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
createPromiseCapability, createValidAbsoluteUrl, MissingDataException,
|
||||||
(function (root, factory) {
|
NotImplementedException, shadow, Util, warn
|
||||||
if (typeof define === 'function' && define.amd) {
|
} from '../shared/util';
|
||||||
define('pdfjs/core/pdf_manager', ['exports', 'pdfjs/shared/util',
|
import { ChunkedStreamManager } from './chunked_stream';
|
||||||
'pdfjs/core/stream', 'pdfjs/core/chunked_stream', 'pdfjs/core/document'],
|
import { PDFDocument } from './document';
|
||||||
factory);
|
import { Stream } from './stream';
|
||||||
} 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 warn = sharedUtil.warn;
|
|
||||||
var createValidAbsoluteUrl = sharedUtil.createValidAbsoluteUrl;
|
|
||||||
var shadow = sharedUtil.shadow;
|
|
||||||
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() {
|
var BasePdfManager = (function BasePdfManagerClosure() {
|
||||||
function BasePdfManager() {
|
function BasePdfManager() {
|
||||||
@ -246,6 +225,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
|||||||
return NetworkPdfManager;
|
return NetworkPdfManager;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.LocalPdfManager = LocalPdfManager;
|
export {
|
||||||
exports.NetworkPdfManager = NetworkPdfManager;
|
LocalPdfManager,
|
||||||
}));
|
NetworkPdfManager,
|
||||||
|
};
|
||||||
|
@ -14,19 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
/* uses XRef */
|
/* uses XRef */
|
||||||
|
|
||||||
'use strict';
|
import { isArray } from '../shared/util';
|
||||||
|
|
||||||
(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 EOF = {};
|
var EOF = {};
|
||||||
|
|
||||||
@ -299,18 +287,19 @@ function isStream(v) {
|
|||||||
return typeof v === 'object' && v !== null && v.getBytes !== undefined;
|
return typeof v === 'object' && v !== null && v.getBytes !== undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.EOF = EOF;
|
export {
|
||||||
exports.Cmd = Cmd;
|
EOF,
|
||||||
exports.Dict = Dict;
|
Cmd,
|
||||||
exports.Name = Name;
|
Dict,
|
||||||
exports.Ref = Ref;
|
Name,
|
||||||
exports.RefSet = RefSet;
|
Ref,
|
||||||
exports.RefSetCache = RefSetCache;
|
RefSet,
|
||||||
exports.isEOF = isEOF;
|
RefSetCache,
|
||||||
exports.isCmd = isCmd;
|
isEOF,
|
||||||
exports.isDict = isDict;
|
isCmd,
|
||||||
exports.isName = isName;
|
isDict,
|
||||||
exports.isRef = isRef;
|
isName,
|
||||||
exports.isRefsEqual = isRefsEqual;
|
isRef,
|
||||||
exports.isStream = isStream;
|
isRefsEqual,
|
||||||
}));
|
isStream,
|
||||||
|
};
|
||||||
|
@ -13,23 +13,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { error, isSpace } from '../shared/util';
|
||||||
|
import { EOF } from './primitives';
|
||||||
(function (root, factory) {
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/ps_parser', ['exports', 'pdfjs/shared/util',
|
|
||||||
'pdfjs/core/primitives'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCorePsParser = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCorePrimitives);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, corePrimitives) {
|
|
||||||
|
|
||||||
var error = sharedUtil.error;
|
|
||||||
var isSpace = sharedUtil.isSpace;
|
|
||||||
var EOF = corePrimitives.EOF;
|
|
||||||
|
|
||||||
var PostScriptParser = (function PostScriptParserClosure() {
|
var PostScriptParser = (function PostScriptParserClosure() {
|
||||||
function PostScriptParser(lexer) {
|
function PostScriptParser(lexer) {
|
||||||
@ -234,6 +219,7 @@ var PostScriptLexer = (function PostScriptLexerClosure() {
|
|||||||
return PostScriptLexer;
|
return PostScriptLexer;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.PostScriptLexer = PostScriptLexer;
|
export {
|
||||||
exports.PostScriptParser = PostScriptParser;
|
PostScriptLexer,
|
||||||
}));
|
PostScriptParser,
|
||||||
|
};
|
||||||
|
@ -13,25 +13,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { getLookupTableFactory } from '../shared/util';
|
||||||
|
|
||||||
(function (root, factory) {
|
/**
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/standard_fonts', ['exports', 'pdfjs/shared/util'],
|
|
||||||
factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreStandardFonts = {}), root.pdfjsSharedUtil);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil) {
|
|
||||||
var getLookupTableFactory = sharedUtil.getLookupTableFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hold a map of decoded fonts and of the standard fourteen Type1
|
* Hold a map of decoded fonts and of the standard fourteen Type1
|
||||||
* fonts and their acronyms.
|
* fonts and their acronyms.
|
||||||
*/
|
*/
|
||||||
var getStdFontMap = getLookupTableFactory(function (t) {
|
var getStdFontMap = getLookupTableFactory(function (t) {
|
||||||
t['ArialNarrow'] = 'Helvetica';
|
t['ArialNarrow'] = 'Helvetica';
|
||||||
t['ArialNarrow-Bold'] = 'Helvetica-Bold';
|
t['ArialNarrow-Bold'] = 'Helvetica-Bold';
|
||||||
t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique';
|
t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique';
|
||||||
@ -87,13 +75,13 @@
|
|||||||
t['TimesNewRomanPSMT-Bold'] = 'Times-Bold';
|
t['TimesNewRomanPSMT-Bold'] = 'Times-Bold';
|
||||||
t['TimesNewRomanPSMT-BoldItalic'] = 'Times-BoldItalic';
|
t['TimesNewRomanPSMT-BoldItalic'] = 'Times-BoldItalic';
|
||||||
t['TimesNewRomanPSMT-Italic'] = 'Times-Italic';
|
t['TimesNewRomanPSMT-Italic'] = 'Times-Italic';
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the map of the non-standard fonts that might be included as
|
* Holds the map of the non-standard fonts that might be included as
|
||||||
* a standard fonts without glyph data.
|
* a standard fonts without glyph data.
|
||||||
*/
|
*/
|
||||||
var getNonStdFontMap = getLookupTableFactory(function (t) {
|
var getNonStdFontMap = getLookupTableFactory(function (t) {
|
||||||
t['CenturyGothic'] = 'Helvetica';
|
t['CenturyGothic'] = 'Helvetica';
|
||||||
t['CenturyGothic-Bold'] = 'Helvetica-Bold';
|
t['CenturyGothic-Bold'] = 'Helvetica-Bold';
|
||||||
t['CenturyGothic-BoldItalic'] = 'Helvetica-BoldOblique';
|
t['CenturyGothic-BoldItalic'] = 'Helvetica-BoldOblique';
|
||||||
@ -124,9 +112,9 @@
|
|||||||
t['MS-PMincho-Italic'] = 'MS PMincho-Italic';
|
t['MS-PMincho-Italic'] = 'MS PMincho-Italic';
|
||||||
t['NuptialScript'] = 'Times-Italic';
|
t['NuptialScript'] = 'Times-Italic';
|
||||||
t['Wingdings'] = 'ZapfDingbats';
|
t['Wingdings'] = 'ZapfDingbats';
|
||||||
});
|
});
|
||||||
|
|
||||||
var getSerifFonts = getLookupTableFactory(function (t) {
|
var getSerifFonts = getLookupTableFactory(function (t) {
|
||||||
t['Adobe Jenson'] = true;
|
t['Adobe Jenson'] = true;
|
||||||
t['Adobe Text'] = true;
|
t['Adobe Text'] = true;
|
||||||
t['Albertus'] = true;
|
t['Albertus'] = true;
|
||||||
@ -260,18 +248,18 @@
|
|||||||
t['Wide Latin'] = true;
|
t['Wide Latin'] = true;
|
||||||
t['Windsor'] = true;
|
t['Windsor'] = true;
|
||||||
t['XITS'] = true;
|
t['XITS'] = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
var getSymbolsFonts = getLookupTableFactory(function (t) {
|
var getSymbolsFonts = getLookupTableFactory(function (t) {
|
||||||
t['Dingbats'] = true;
|
t['Dingbats'] = true;
|
||||||
t['Symbol'] = true;
|
t['Symbol'] = true;
|
||||||
t['ZapfDingbats'] = true;
|
t['ZapfDingbats'] = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Glyph map for well-known standard fonts. Sometimes Ghostscript uses CID
|
// Glyph map for well-known standard fonts. Sometimes Ghostscript uses CID
|
||||||
// fonts, but does not embed the CID to GID mapping. The mapping is incomplete
|
// fonts, but does not embed the CID to GID mapping. The mapping is incomplete
|
||||||
// for all glyphs, but common for some set of the standard fonts.
|
// for all glyphs, but common for some set of the standard fonts.
|
||||||
var getGlyphMapForStandardFonts = getLookupTableFactory(function (t) {
|
var getGlyphMapForStandardFonts = getLookupTableFactory(function (t) {
|
||||||
t[2] = 10; t[3] = 32; t[4] = 33; t[5] = 34; t[6] = 35; t[7] = 36; t[8] = 37;
|
t[2] = 10; t[3] = 32; t[4] = 33; t[5] = 34; t[6] = 35; t[7] = 36; t[8] = 37;
|
||||||
t[9] = 38; t[10] = 39; t[11] = 40; t[12] = 41; t[13] = 42; t[14] = 43;
|
t[9] = 38; t[10] = 39; t[11] = 40; t[12] = 41; t[13] = 42; t[14] = 43;
|
||||||
t[15] = 44; t[16] = 45; t[17] = 46; t[18] = 47; t[19] = 48; t[20] = 49;
|
t[15] = 44; t[16] = 45; t[17] = 46; t[18] = 47; t[19] = 48; t[20] = 49;
|
||||||
@ -356,21 +344,21 @@
|
|||||||
t[3173] = 1278; t[3174] = 1279; t[3181] = 7622; t[3182] = 7623;
|
t[3173] = 1278; t[3174] = 1279; t[3181] = 7622; t[3182] = 7623;
|
||||||
t[3282] = 11799; t[3316] = 578; t[3379] = 42785; t[3393] = 1159;
|
t[3282] = 11799; t[3316] = 578; t[3379] = 42785; t[3393] = 1159;
|
||||||
t[3416] = 8377;
|
t[3416] = 8377;
|
||||||
});
|
});
|
||||||
|
|
||||||
// The glyph map for ArialBlack differs slightly from the glyph map used for
|
// The glyph map for ArialBlack differs slightly from the glyph map used for
|
||||||
// other well-known standard fonts. Hence we use this (incomplete) CID to GID
|
// other well-known standard fonts. Hence we use this (incomplete) CID to GID
|
||||||
// mapping to adjust the glyph map for non-embedded ArialBlack fonts.
|
// mapping to adjust the glyph map for non-embedded ArialBlack fonts.
|
||||||
var getSupplementalGlyphMapForArialBlack =
|
var getSupplementalGlyphMapForArialBlack =
|
||||||
getLookupTableFactory(function (t) {
|
getLookupTableFactory(function (t) {
|
||||||
t[227] = 322; t[264] = 261; t[291] = 346;
|
t[227] = 322; t[264] = 261; t[291] = 346;
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.getStdFontMap = getStdFontMap;
|
export {
|
||||||
exports.getNonStdFontMap = getNonStdFontMap;
|
getStdFontMap,
|
||||||
exports.getSerifFonts = getSerifFonts;
|
getNonStdFontMap,
|
||||||
exports.getSymbolsFonts = getSymbolsFonts;
|
getSerifFonts,
|
||||||
exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts;
|
getSymbolsFonts,
|
||||||
exports.getSupplementalGlyphMapForArialBlack =
|
getGlyphMapForStandardFonts,
|
||||||
getSupplementalGlyphMapForArialBlack;
|
getSupplementalGlyphMapForArialBlack,
|
||||||
}));
|
};
|
||||||
|
@ -13,38 +13,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
createObjectURL, error, info, isArray, isInt, isSpace, shadow, Util
|
||||||
(function (root, factory) {
|
} from '../shared/util';
|
||||||
if (typeof define === 'function' && define.amd) {
|
import { Dict, isDict, isStream } from './primitives';
|
||||||
define('pdfjs/core/stream', ['exports', 'pdfjs/shared/util',
|
import { Jbig2Image } from './jbig2';
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/jbig2', 'pdfjs/core/jpg',
|
import { JpegImage } from './jpg';
|
||||||
'pdfjs/core/jpx'], factory);
|
import { JpxImage } from './jpx';
|
||||||
} 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 isInt = sharedUtil.isInt;
|
|
||||||
var isArray = sharedUtil.isArray;
|
|
||||||
var createObjectURL = sharedUtil.createObjectURL;
|
|
||||||
var shadow = sharedUtil.shadow;
|
|
||||||
var isSpace = sharedUtil.isSpace;
|
|
||||||
var Dict = corePrimitives.Dict;
|
|
||||||
var isDict = corePrimitives.isDict;
|
|
||||||
var isStream = corePrimitives.isStream;
|
|
||||||
var Jbig2Image = coreJbig2.Jbig2Image;
|
|
||||||
var JpegImage = coreJpg.JpegImage;
|
|
||||||
var JpxImage = coreJpx.JpxImage;
|
|
||||||
|
|
||||||
var Stream = (function StreamClosure() {
|
var Stream = (function StreamClosure() {
|
||||||
function Stream(arrayBuffer, start, length, dict) {
|
function Stream(arrayBuffer, start, length, dict) {
|
||||||
@ -2476,20 +2451,21 @@ var NullStream = (function NullStreamClosure() {
|
|||||||
return NullStream;
|
return NullStream;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.Ascii85Stream = Ascii85Stream;
|
export {
|
||||||
exports.AsciiHexStream = AsciiHexStream;
|
Ascii85Stream,
|
||||||
exports.CCITTFaxStream = CCITTFaxStream;
|
AsciiHexStream,
|
||||||
exports.DecryptStream = DecryptStream;
|
CCITTFaxStream,
|
||||||
exports.DecodeStream = DecodeStream;
|
DecryptStream,
|
||||||
exports.FlateStream = FlateStream;
|
DecodeStream,
|
||||||
exports.Jbig2Stream = Jbig2Stream;
|
FlateStream,
|
||||||
exports.JpegStream = JpegStream;
|
Jbig2Stream,
|
||||||
exports.JpxStream = JpxStream;
|
JpegStream,
|
||||||
exports.NullStream = NullStream;
|
JpxStream,
|
||||||
exports.PredictorStream = PredictorStream;
|
NullStream,
|
||||||
exports.RunLengthStream = RunLengthStream;
|
PredictorStream,
|
||||||
exports.Stream = Stream;
|
RunLengthStream,
|
||||||
exports.StreamsSequenceStream = StreamsSequenceStream;
|
Stream,
|
||||||
exports.StringStream = StringStream;
|
StreamsSequenceStream,
|
||||||
exports.LZWStream = LZWStream;
|
StringStream,
|
||||||
}));
|
LZWStream,
|
||||||
|
};
|
||||||
|
@ -13,25 +13,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import { isSpace, warn } from '../shared/util';
|
||||||
|
import { getEncoding } from './encodings';
|
||||||
(function (root, factory) {
|
import { Stream } from './stream';
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
define('pdfjs/core/type1_parser', ['exports', 'pdfjs/shared/util',
|
|
||||||
'pdfjs/core/stream', 'pdfjs/core/encodings'], factory);
|
|
||||||
} else if (typeof exports !== 'undefined') {
|
|
||||||
factory(exports, require('../shared/util.js'), require('./stream.js'),
|
|
||||||
require('./encodings.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreType1Parser = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCoreStream, root.pdfjsCoreEncodings);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, coreStream, coreEncodings) {
|
|
||||||
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var isSpace = sharedUtil.isSpace;
|
|
||||||
var Stream = coreStream.Stream;
|
|
||||||
var getEncoding = coreEncodings.getEncoding;
|
|
||||||
|
|
||||||
// Hinting is currently disabled due to unknown problems on windows
|
// Hinting is currently disabled due to unknown problems on windows
|
||||||
// in tracemonkey and various other pdfs with type1 fonts.
|
// in tracemonkey and various other pdfs with type1 fonts.
|
||||||
@ -717,5 +701,6 @@ var Type1Parser = (function Type1ParserClosure() {
|
|||||||
return Type1Parser;
|
return Type1Parser;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports.Type1Parser = Type1Parser;
|
export {
|
||||||
}));
|
Type1Parser,
|
||||||
|
};
|
||||||
|
@ -14,23 +14,12 @@
|
|||||||
*/
|
*/
|
||||||
/* no-babel-preset */
|
/* no-babel-preset */
|
||||||
|
|
||||||
'use strict';
|
var getLookupTableFactory = require('../shared/util').getLookupTableFactory;
|
||||||
|
|
||||||
(function (root, factory) {
|
// Some characters, e.g. copyrightserif, are mapped to the private use area
|
||||||
if (typeof define === 'function' && define.amd) {
|
// and might not be displayed using standard fonts. Mapping/hacking well-known
|
||||||
define('pdfjs/core/unicode', ['exports', 'pdfjs/shared/util'], factory);
|
// chars to the similar equivalents in the normal characters range.
|
||||||
} else if (typeof exports !== 'undefined') {
|
var getSpecialPUASymbols = getLookupTableFactory(function (t) {
|
||||||
factory(exports, require('../shared/util.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreUnicode = {}), root.pdfjsSharedUtil);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil) {
|
|
||||||
var getLookupTableFactory = sharedUtil.getLookupTableFactory;
|
|
||||||
|
|
||||||
// Some characters, e.g. copyrightserif, are mapped to the private use area
|
|
||||||
// and might not be displayed using standard fonts. Mapping/hacking well-known
|
|
||||||
// chars to the similar equivalents in the normal characters range.
|
|
||||||
var getSpecialPUASymbols = getLookupTableFactory(function (t) {
|
|
||||||
t[63721] = 0x00A9; // copyrightsans (0xF8E9) => copyright
|
t[63721] = 0x00A9; // copyrightsans (0xF8E9) => copyright
|
||||||
t[63193] = 0x00A9; // copyrightserif (0xF6D9) => copyright
|
t[63193] = 0x00A9; // copyrightserif (0xF6D9) => copyright
|
||||||
t[63720] = 0x00AE; // registersans (0xF8E8) => registered
|
t[63720] = 0x00AE; // registersans (0xF8E8) => registered
|
||||||
@ -55,18 +44,18 @@
|
|||||||
t[63734] = 0x239E; // parenrighttp (0xF8F6)
|
t[63734] = 0x239E; // parenrighttp (0xF8F6)
|
||||||
t[63735] = 0x239F; // parenrightex (0xF8F7)
|
t[63735] = 0x239F; // parenrightex (0xF8F7)
|
||||||
t[63736] = 0x23A0; // parenrightbt (0xF8F8)
|
t[63736] = 0x23A0; // parenrightbt (0xF8F8)
|
||||||
});
|
});
|
||||||
|
|
||||||
function mapSpecialUnicodeValues(code) {
|
function mapSpecialUnicodeValues(code) {
|
||||||
if (code >= 0xFFF0 && code <= 0xFFFF) { // Specials unicode block.
|
if (code >= 0xFFF0 && code <= 0xFFFF) { // Specials unicode block.
|
||||||
return 0;
|
return 0;
|
||||||
} else if (code >= 0xF600 && code <= 0xF8FF) {
|
} else if (code >= 0xF600 && code <= 0xF8FF) {
|
||||||
return (getSpecialPUASymbols()[code] || code);
|
return (getSpecialPUASymbols()[code] || code);
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUnicodeForGlyph(name, glyphsUnicodeMap) {
|
function getUnicodeForGlyph(name, glyphsUnicodeMap) {
|
||||||
var unicode = glyphsUnicodeMap[name];
|
var unicode = glyphsUnicodeMap[name];
|
||||||
if (unicode !== undefined) {
|
if (unicode !== undefined) {
|
||||||
return unicode;
|
return unicode;
|
||||||
@ -94,9 +83,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var UnicodeRanges = [
|
var UnicodeRanges = [
|
||||||
{ 'begin': 0x0000, 'end': 0x007F }, // Basic Latin
|
{ 'begin': 0x0000, 'end': 0x007F }, // Basic Latin
|
||||||
{ 'begin': 0x0080, 'end': 0x00FF }, // Latin-1 Supplement
|
{ 'begin': 0x0080, 'end': 0x00FF }, // Latin-1 Supplement
|
||||||
{ 'begin': 0x0100, 'end': 0x017F }, // Latin Extended-A
|
{ 'begin': 0x0100, 'end': 0x017F }, // Latin Extended-A
|
||||||
@ -220,9 +209,9 @@
|
|||||||
{ 'begin': 0x101D0, 'end': 0x101FF }, // Phaistos Disc
|
{ 'begin': 0x101D0, 'end': 0x101FF }, // Phaistos Disc
|
||||||
{ 'begin': 0x102A0, 'end': 0x102DF }, // Carian
|
{ 'begin': 0x102A0, 'end': 0x102DF }, // Carian
|
||||||
{ 'begin': 0x1F030, 'end': 0x1F09F } // Domino Tiles
|
{ 'begin': 0x1F030, 'end': 0x1F09F } // Domino Tiles
|
||||||
];
|
];
|
||||||
|
|
||||||
function getUnicodeRangeFor(value) {
|
function getUnicodeRangeFor(value) {
|
||||||
for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) {
|
for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) {
|
||||||
var range = UnicodeRanges[i];
|
var range = UnicodeRanges[i];
|
||||||
if (value >= range.begin && value < range.end) {
|
if (value >= range.begin && value < range.end) {
|
||||||
@ -230,9 +219,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRTLRangeFor(value) {
|
function isRTLRangeFor(value) {
|
||||||
var range = UnicodeRanges[13];
|
var range = UnicodeRanges[13];
|
||||||
if (value >= range.begin && value < range.end) {
|
if (value >= range.begin && value < range.end) {
|
||||||
return true;
|
return true;
|
||||||
@ -242,11 +231,11 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The normalization table is obtained by filtering the Unicode characters
|
// The normalization table is obtained by filtering the Unicode characters
|
||||||
// database with <compat> entries.
|
// database with <compat> entries.
|
||||||
var getNormalizedUnicodes = getLookupTableFactory(function (t) {
|
var getNormalizedUnicodes = getLookupTableFactory(function (t) {
|
||||||
t['\u00A8'] = '\u0020\u0308';
|
t['\u00A8'] = '\u0020\u0308';
|
||||||
t['\u00AF'] = '\u0020\u0304';
|
t['\u00AF'] = '\u0020\u0304';
|
||||||
t['\u00B4'] = '\u0020\u0301';
|
t['\u00B4'] = '\u0020\u0301';
|
||||||
@ -1624,9 +1613,9 @@
|
|||||||
t['\uFEFA'] = '\u0644\u0625';
|
t['\uFEFA'] = '\u0644\u0625';
|
||||||
t['\uFEFB'] = '\u0644\u0627';
|
t['\uFEFB'] = '\u0644\u0627';
|
||||||
t['\uFEFC'] = '\u0644\u0627';
|
t['\uFEFC'] = '\u0644\u0627';
|
||||||
});
|
});
|
||||||
|
|
||||||
function reverseIfRtl(chars) {
|
function reverseIfRtl(chars) {
|
||||||
var charsLength = chars.length;
|
var charsLength = chars.length;
|
||||||
// Reverse an arabic ligature.
|
// Reverse an arabic ligature.
|
||||||
if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) {
|
if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) {
|
||||||
@ -1637,11 +1626,10 @@
|
|||||||
s += chars[ii];
|
s += chars[ii];
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.mapSpecialUnicodeValues = mapSpecialUnicodeValues;
|
exports.mapSpecialUnicodeValues = mapSpecialUnicodeValues;
|
||||||
exports.reverseIfRtl = reverseIfRtl;
|
exports.reverseIfRtl = reverseIfRtl;
|
||||||
exports.getUnicodeRangeFor = getUnicodeRangeFor;
|
exports.getUnicodeRangeFor = getUnicodeRangeFor;
|
||||||
exports.getNormalizedUnicodes = getNormalizedUnicodes;
|
exports.getNormalizedUnicodes = getNormalizedUnicodes;
|
||||||
exports.getUnicodeForGlyph = getUnicodeForGlyph;
|
exports.getUnicodeForGlyph = getUnicodeForGlyph;
|
||||||
}));
|
|
||||||
|
@ -13,41 +13,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
import {
|
||||||
|
arrayByteLength, arraysToBytes, assert, createPromiseCapability, info,
|
||||||
(function (root, factory) {
|
InvalidPDFException, isNodeJS, MessageHandler, MissingPDFException,
|
||||||
if (typeof define === 'function' && define.amd) {
|
PasswordException, setVerbosityLevel, UnexpectedResponseException,
|
||||||
define('pdfjs/core/worker', ['exports', 'pdfjs/shared/util',
|
UnknownErrorException, UNSUPPORTED_FEATURES, warn, XRefParseException
|
||||||
'pdfjs/core/primitives', 'pdfjs/core/pdf_manager'],
|
} from '../shared/util';
|
||||||
factory);
|
import { LocalPdfManager, NetworkPdfManager } from './pdf_manager';
|
||||||
} else if (typeof exports !== 'undefined') {
|
import { Ref } from './primitives';
|
||||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
|
||||||
require('./pdf_manager.js'));
|
|
||||||
} else {
|
|
||||||
factory((root.pdfjsCoreWorker = {}), root.pdfjsSharedUtil,
|
|
||||||
root.pdfjsCorePrimitives, root.pdfjsCorePdfManager);
|
|
||||||
}
|
|
||||||
}(this, function (exports, sharedUtil, corePrimitives, corePdfManager) {
|
|
||||||
|
|
||||||
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 UnknownErrorException = sharedUtil.UnknownErrorException;
|
|
||||||
var XRefParseException = sharedUtil.XRefParseException;
|
|
||||||
var arrayByteLength = sharedUtil.arrayByteLength;
|
|
||||||
var arraysToBytes = sharedUtil.arraysToBytes;
|
|
||||||
var assert = sharedUtil.assert;
|
|
||||||
var createPromiseCapability = sharedUtil.createPromiseCapability;
|
|
||||||
var info = sharedUtil.info;
|
|
||||||
var warn = sharedUtil.warn;
|
|
||||||
var setVerbosityLevel = sharedUtil.setVerbosityLevel;
|
|
||||||
var isNodeJS = sharedUtil.isNodeJS;
|
|
||||||
var Ref = corePrimitives.Ref;
|
|
||||||
var LocalPdfManager = corePdfManager.LocalPdfManager;
|
|
||||||
var NetworkPdfManager = corePdfManager.NetworkPdfManager;
|
|
||||||
|
|
||||||
var WorkerTask = (function WorkerTaskClosure() {
|
var WorkerTask = (function WorkerTaskClosure() {
|
||||||
function WorkerTask(name) {
|
function WorkerTask(name) {
|
||||||
@ -568,7 +541,7 @@ var WorkerMessageHandler = {
|
|||||||
if (source.chunkedViewerLoading) {
|
if (source.chunkedViewerLoading) {
|
||||||
pdfStream = new PDFWorkerStream(source, handler);
|
pdfStream = new PDFWorkerStream(source, handler);
|
||||||
} else {
|
} else {
|
||||||
assert(PDFNetworkStream, 'pdfjs/core/network module is not loaded');
|
assert(PDFNetworkStream, './network module is not loaded');
|
||||||
pdfStream = new PDFNetworkStream(data);
|
pdfStream = new PDFNetworkStream(data);
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@ -982,7 +955,8 @@ if (typeof window === 'undefined' && !isNodeJS() &&
|
|||||||
WorkerMessageHandler.initializeFromPort(self);
|
WorkerMessageHandler.initializeFromPort(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.setPDFNetworkStreamClass = setPDFNetworkStreamClass;
|
export {
|
||||||
exports.WorkerTask = WorkerTask;
|
setPDFNetworkStreamClass,
|
||||||
exports.WorkerMessageHandler = WorkerMessageHandler;
|
WorkerTask,
|
||||||
}));
|
WorkerMessageHandler,
|
||||||
|
};
|
||||||
|
@ -68,4 +68,5 @@
|
|||||||
displayDOMUtils.RenderingCancelledException;
|
displayDOMUtils.RenderingCancelledException;
|
||||||
exports.getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl;
|
exports.getFilenameFromUrl = displayDOMUtils.getFilenameFromUrl;
|
||||||
exports.addLinkAttributes = displayDOMUtils.addLinkAttributes;
|
exports.addLinkAttributes = displayDOMUtils.addLinkAttributes;
|
||||||
|
exports.StatTimer = sharedUtil.StatTimer;
|
||||||
}));
|
}));
|
||||||
|
@ -57,3 +57,4 @@ exports.RenderingCancelledException =
|
|||||||
pdfjsDisplayDOMUtils.RenderingCancelledException;
|
pdfjsDisplayDOMUtils.RenderingCancelledException;
|
||||||
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
|
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
|
||||||
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;
|
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;
|
||||||
|
exports.StatTimer = pdfjsSharedUtil.StatTimer;
|
||||||
|
@ -12,13 +12,15 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/* globals PDFJS, pdfjsSharedUtil */
|
/* globals PDFJS, pdfjsDistBuildPdf */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var WAITING_TIME = 100; // ms
|
var WAITING_TIME = 100; // ms
|
||||||
var PDF_TO_CSS_UNITS = 96.0 / 72.0;
|
var PDF_TO_CSS_UNITS = 96.0 / 72.0;
|
||||||
|
|
||||||
|
var StatTimer = pdfjsDistBuildPdf.StatTimer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class
|
* @class
|
||||||
*/
|
*/
|
||||||
@ -258,7 +260,7 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||||||
*/
|
*/
|
||||||
function Driver(options) {
|
function Driver(options) {
|
||||||
// Configure the global PDFJS object
|
// Configure the global PDFJS object
|
||||||
PDFJS.workerSrc = '../src/worker_loader.js';
|
PDFJS.workerSrc = '../build/generic/build/pdf.worker.js';
|
||||||
PDFJS.cMapPacked = true;
|
PDFJS.cMapPacked = true;
|
||||||
PDFJS.cMapUrl = '../external/bcmaps/';
|
PDFJS.cMapUrl = '../external/bcmaps/';
|
||||||
PDFJS.enableStats = true;
|
PDFJS.enableStats = true;
|
||||||
@ -547,7 +549,7 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||||||
}
|
}
|
||||||
page.cleanup();
|
page.cleanup();
|
||||||
task.stats = page.stats;
|
task.stats = page.stats;
|
||||||
page.stats = new pdfjsSharedUtil.StatTimer();
|
page.stats = new StatTimer();
|
||||||
self._snapshot(task, error);
|
self._snapshot(task, error);
|
||||||
});
|
});
|
||||||
initPromise.then(function () {
|
initPromise.then(function () {
|
||||||
|
@ -18,8 +18,7 @@ limitations under the License.
|
|||||||
<head>
|
<head>
|
||||||
<title>PDF.js test slave</title>
|
<title>PDF.js test slave</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<script src="../node_modules/systemjs/dist/system.js"></script>
|
<script src="../build/generic/build/pdf.js"></script>
|
||||||
<script src="../systemjs.config.js"></script>
|
|
||||||
<script src="driver.js"></script>
|
<script src="driver.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -32,14 +31,6 @@ limitations under the License.
|
|||||||
<div id="end"></div>
|
<div id="end"></div>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
Promise.all([SystemJS.import('pdfjs/display/api'),
|
|
||||||
SystemJS.import('pdfjs/display/text_layer'),
|
|
||||||
SystemJS.import('pdfjs/display/annotation_layer'),
|
|
||||||
SystemJS.import('pdfjs/display/global'),
|
|
||||||
SystemJS.import('pdfjs/shared/util')])
|
|
||||||
.then(function (modules) {
|
|
||||||
window.pdfjsSharedUtil = modules[4];
|
|
||||||
|
|
||||||
var driver = new Driver({
|
var driver = new Driver({
|
||||||
disableScrolling: document.getElementById('disableScrolling'),
|
disableScrolling: document.getElementById('disableScrolling'),
|
||||||
inflight: document.getElementById('inflight'),
|
inflight: document.getElementById('inflight'),
|
||||||
@ -47,6 +38,5 @@ limitations under the License.
|
|||||||
end: document.getElementById('end')
|
end: document.getElementById('end')
|
||||||
});
|
});
|
||||||
driver.run();
|
driver.run();
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -60,7 +60,7 @@ function initializePDFJS(callback) {
|
|||||||
var displayGlobal = modules[0];
|
var displayGlobal = modules[0];
|
||||||
|
|
||||||
// Configure the worker.
|
// Configure the worker.
|
||||||
displayGlobal.PDFJS.workerSrc = '../../src/worker_loader.js';
|
displayGlobal.PDFJS.workerSrc = '../../build/generic/build/pdf.worker.js';
|
||||||
// Opt-in to using the latest API.
|
// Opt-in to using the latest API.
|
||||||
displayGlobal.PDFJS.pdfjsNext = true;
|
displayGlobal.PDFJS.pdfjsNext = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user