|
|
@ -105,7 +105,7 @@ return /******/ (function(modules) { // webpackBootstrap |
|
|
|
Object.defineProperty(exports, "__esModule", { |
|
|
|
Object.defineProperty(exports, "__esModule", { |
|
|
|
value: true |
|
|
|
value: true |
|
|
|
}); |
|
|
|
}); |
|
|
|
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; |
|
|
|
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.getInheritableProperty = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; |
|
|
|
|
|
|
|
|
|
|
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
|
|
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
|
|
|
|
|
|
|
|
|
|
@ -629,6 +629,36 @@ function isEvalSupported() { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function getInheritableProperty(_ref) { |
|
|
|
|
|
|
|
var dict = _ref.dict, |
|
|
|
|
|
|
|
key = _ref.key, |
|
|
|
|
|
|
|
_ref$getArray = _ref.getArray, |
|
|
|
|
|
|
|
getArray = _ref$getArray === undefined ? false : _ref$getArray, |
|
|
|
|
|
|
|
_ref$stopWhenFound = _ref.stopWhenFound, |
|
|
|
|
|
|
|
stopWhenFound = _ref$stopWhenFound === undefined ? true : _ref$stopWhenFound; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var LOOP_LIMIT = 100; |
|
|
|
|
|
|
|
var loopCount = 0; |
|
|
|
|
|
|
|
var values = void 0; |
|
|
|
|
|
|
|
while (dict) { |
|
|
|
|
|
|
|
var value = getArray ? dict.getArray(key) : dict.get(key); |
|
|
|
|
|
|
|
if (value !== undefined) { |
|
|
|
|
|
|
|
if (stopWhenFound) { |
|
|
|
|
|
|
|
return value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!values) { |
|
|
|
|
|
|
|
values = []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
values.push(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (++loopCount > LOOP_LIMIT) { |
|
|
|
|
|
|
|
warn('getInheritableProperty: maximum loop count exceeded for "' + key + '"'); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
dict = dict.get('Parent'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return values; |
|
|
|
|
|
|
|
} |
|
|
|
var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; |
|
|
|
var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; |
|
|
|
var Util = function UtilClosure() { |
|
|
|
var Util = function UtilClosure() { |
|
|
|
function Util() {} |
|
|
|
function Util() {} |
|
|
@ -744,15 +774,6 @@ var Util = function UtilClosure() { |
|
|
|
obj1[key] = obj2[key]; |
|
|
|
obj1[key] = obj2[key]; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
Util.getInheritableProperty = function Util_getInheritableProperty(dict, name, getArray) { |
|
|
|
|
|
|
|
while (dict && !dict.has(name)) { |
|
|
|
|
|
|
|
dict = dict.get('Parent'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!dict) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return getArray ? dict.getArray(name) : dict.get(name); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
Util.inherit = function Util_inherit(sub, base, prototype) { |
|
|
|
Util.inherit = function Util_inherit(sub, base, prototype) { |
|
|
|
sub.prototype = Object.create(base.prototype); |
|
|
|
sub.prototype = Object.create(base.prototype); |
|
|
|
sub.prototype.constructor = sub; |
|
|
|
sub.prototype.constructor = sub; |
|
|
@ -1143,12 +1164,12 @@ MessageHandler.prototype = { |
|
|
|
var sourceName = this.sourceName; |
|
|
|
var sourceName = this.sourceName; |
|
|
|
var targetName = data.sourceName; |
|
|
|
var targetName = data.sourceName; |
|
|
|
var capability = createPromiseCapability(); |
|
|
|
var capability = createPromiseCapability(); |
|
|
|
var sendStreamRequest = function sendStreamRequest(_ref) { |
|
|
|
var sendStreamRequest = function sendStreamRequest(_ref2) { |
|
|
|
var stream = _ref.stream, |
|
|
|
var stream = _ref2.stream, |
|
|
|
chunk = _ref.chunk, |
|
|
|
chunk = _ref2.chunk, |
|
|
|
transfers = _ref.transfers, |
|
|
|
transfers = _ref2.transfers, |
|
|
|
success = _ref.success, |
|
|
|
success = _ref2.success, |
|
|
|
reason = _ref.reason; |
|
|
|
reason = _ref2.reason; |
|
|
|
|
|
|
|
|
|
|
|
_this3.postMessage({ |
|
|
|
_this3.postMessage({ |
|
|
|
sourceName: sourceName, |
|
|
|
sourceName: sourceName, |
|
|
@ -1228,10 +1249,10 @@ MessageHandler.prototype = { |
|
|
|
var sourceName = this.sourceName; |
|
|
|
var sourceName = this.sourceName; |
|
|
|
var targetName = data.sourceName; |
|
|
|
var targetName = data.sourceName; |
|
|
|
var streamId = data.streamId; |
|
|
|
var streamId = data.streamId; |
|
|
|
var sendStreamResponse = function sendStreamResponse(_ref2) { |
|
|
|
var sendStreamResponse = function sendStreamResponse(_ref3) { |
|
|
|
var stream = _ref2.stream, |
|
|
|
var stream = _ref3.stream, |
|
|
|
success = _ref2.success, |
|
|
|
success = _ref3.success, |
|
|
|
reason = _ref2.reason; |
|
|
|
reason = _ref3.reason; |
|
|
|
|
|
|
|
|
|
|
|
_this4.comObj.postMessage({ |
|
|
|
_this4.comObj.postMessage({ |
|
|
|
sourceName: sourceName, |
|
|
|
sourceName: sourceName, |
|
|
@ -1377,6 +1398,7 @@ exports.createBlob = createBlob; |
|
|
|
exports.createPromiseCapability = createPromiseCapability; |
|
|
|
exports.createPromiseCapability = createPromiseCapability; |
|
|
|
exports.createObjectURL = createObjectURL; |
|
|
|
exports.createObjectURL = createObjectURL; |
|
|
|
exports.deprecated = deprecated; |
|
|
|
exports.deprecated = deprecated; |
|
|
|
|
|
|
|
exports.getInheritableProperty = getInheritableProperty; |
|
|
|
exports.getLookupTableFactory = getLookupTableFactory; |
|
|
|
exports.getLookupTableFactory = getLookupTableFactory; |
|
|
|
exports.getVerbosityLevel = getVerbosityLevel; |
|
|
|
exports.getVerbosityLevel = getVerbosityLevel; |
|
|
|
exports.info = info; |
|
|
|
exports.info = info; |
|
|
@ -22315,8 +22337,8 @@ exports.PostScriptCompiler = PostScriptCompiler; |
|
|
|
"use strict"; |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pdfjsVersion = '2.0.421'; |
|
|
|
var pdfjsVersion = '2.0.424'; |
|
|
|
var pdfjsBuild = 'e0fb18a3'; |
|
|
|
var pdfjsBuild = 'fded22c6'; |
|
|
|
var pdfjsCoreWorker = __w_pdfjs_require__(74); |
|
|
|
var pdfjsCoreWorker = __w_pdfjs_require__(74); |
|
|
|
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; |
|
|
|
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; |
|
|
|
|
|
|
|
|
|
|
@ -22529,7 +22551,7 @@ var WorkerMessageHandler = { |
|
|
|
var cancelXHRs = null; |
|
|
|
var cancelXHRs = null; |
|
|
|
var WorkerTasks = []; |
|
|
|
var WorkerTasks = []; |
|
|
|
var apiVersion = docParams.apiVersion; |
|
|
|
var apiVersion = docParams.apiVersion; |
|
|
|
var workerVersion = '2.0.421'; |
|
|
|
var workerVersion = '2.0.424'; |
|
|
|
if (apiVersion !== null && apiVersion !== workerVersion) { |
|
|
|
if (apiVersion !== null && apiVersion !== workerVersion) { |
|
|
|
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); |
|
|
|
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); |
|
|
|
} |
|
|
|
} |
|
|
@ -28330,59 +28352,46 @@ var Page = function PageClosure() { |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
Page.prototype = { |
|
|
|
Page.prototype = { |
|
|
|
getPageProp: function Page_getPageProp(key) { |
|
|
|
_getInheritableProperty: function _getInheritableProperty(key) { |
|
|
|
return this.pageDict.get(key); |
|
|
|
var getArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; |
|
|
|
}, |
|
|
|
|
|
|
|
getInheritedPageProp: function Page_getInheritedPageProp(key, getArray) { |
|
|
|
var value = (0, _util.getInheritableProperty)({ |
|
|
|
var dict = this.pageDict, |
|
|
|
dict: this.pageDict, |
|
|
|
valueArray = null, |
|
|
|
key: key, |
|
|
|
loopCount = 0; |
|
|
|
getArray: getArray, |
|
|
|
var MAX_LOOP_COUNT = 100; |
|
|
|
stopWhenFound: false |
|
|
|
getArray = getArray || false; |
|
|
|
}); |
|
|
|
while (dict) { |
|
|
|
if (!Array.isArray(value)) { |
|
|
|
var value = getArray ? dict.getArray(key) : dict.get(key); |
|
|
|
return value; |
|
|
|
if (value !== undefined) { |
|
|
|
|
|
|
|
if (!valueArray) { |
|
|
|
|
|
|
|
valueArray = []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
valueArray.push(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (++loopCount > MAX_LOOP_COUNT) { |
|
|
|
|
|
|
|
(0, _util.warn)('getInheritedPageProp: maximum loop count exceeded for ' + key); |
|
|
|
|
|
|
|
return valueArray ? valueArray[0] : undefined; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
dict = dict.get('Parent'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!valueArray) { |
|
|
|
|
|
|
|
return undefined; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (valueArray.length === 1 || !(0, _primitives.isDict)(valueArray[0])) { |
|
|
|
if (value.length === 1 || !(0, _primitives.isDict)(value[0])) { |
|
|
|
return valueArray[0]; |
|
|
|
return value[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
return _primitives.Dict.merge(this.xref, valueArray); |
|
|
|
return _primitives.Dict.merge(this.xref, value); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
get content() { |
|
|
|
get content() { |
|
|
|
return this.getPageProp('Contents'); |
|
|
|
return this.pageDict.get('Contents'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
get resources() { |
|
|
|
get resources() { |
|
|
|
return (0, _util.shadow)(this, 'resources', this.getInheritedPageProp('Resources') || _primitives.Dict.empty); |
|
|
|
return (0, _util.shadow)(this, 'resources', this._getInheritableProperty('Resources') || _primitives.Dict.empty); |
|
|
|
}, |
|
|
|
}, |
|
|
|
get mediaBox() { |
|
|
|
get mediaBox() { |
|
|
|
var mediaBox = this.getInheritedPageProp('MediaBox', true); |
|
|
|
var mediaBox = this._getInheritableProperty('MediaBox', true); |
|
|
|
if (!Array.isArray(mediaBox) || mediaBox.length !== 4) { |
|
|
|
if (!Array.isArray(mediaBox) || mediaBox.length !== 4) { |
|
|
|
return (0, _util.shadow)(this, 'mediaBox', LETTER_SIZE_MEDIABOX); |
|
|
|
return (0, _util.shadow)(this, 'mediaBox', LETTER_SIZE_MEDIABOX); |
|
|
|
} |
|
|
|
} |
|
|
|
return (0, _util.shadow)(this, 'mediaBox', mediaBox); |
|
|
|
return (0, _util.shadow)(this, 'mediaBox', mediaBox); |
|
|
|
}, |
|
|
|
}, |
|
|
|
get cropBox() { |
|
|
|
get cropBox() { |
|
|
|
var cropBox = this.getInheritedPageProp('CropBox', true); |
|
|
|
var cropBox = this._getInheritableProperty('CropBox', true); |
|
|
|
if (!Array.isArray(cropBox) || cropBox.length !== 4) { |
|
|
|
if (!Array.isArray(cropBox) || cropBox.length !== 4) { |
|
|
|
return (0, _util.shadow)(this, 'cropBox', this.mediaBox); |
|
|
|
return (0, _util.shadow)(this, 'cropBox', this.mediaBox); |
|
|
|
} |
|
|
|
} |
|
|
|
return (0, _util.shadow)(this, 'cropBox', cropBox); |
|
|
|
return (0, _util.shadow)(this, 'cropBox', cropBox); |
|
|
|
}, |
|
|
|
}, |
|
|
|
get userUnit() { |
|
|
|
get userUnit() { |
|
|
|
var obj = this.getPageProp('UserUnit'); |
|
|
|
var obj = this.pageDict.get('UserUnit'); |
|
|
|
if (!(0, _util.isNum)(obj) || obj <= 0) { |
|
|
|
if (!(0, _util.isNum)(obj) || obj <= 0) { |
|
|
|
obj = DEFAULT_USER_UNIT; |
|
|
|
obj = DEFAULT_USER_UNIT; |
|
|
|
} |
|
|
|
} |
|
|
@ -28398,7 +28407,7 @@ var Page = function PageClosure() { |
|
|
|
return (0, _util.shadow)(this, 'view', intersection || mediaBox); |
|
|
|
return (0, _util.shadow)(this, 'view', intersection || mediaBox); |
|
|
|
}, |
|
|
|
}, |
|
|
|
get rotate() { |
|
|
|
get rotate() { |
|
|
|
var rotate = this.getInheritedPageProp('Rotate') || 0; |
|
|
|
var rotate = this._getInheritableProperty('Rotate') || 0; |
|
|
|
if (rotate % 90 !== 0) { |
|
|
|
if (rotate % 90 !== 0) { |
|
|
|
rotate = 0; |
|
|
|
rotate = 0; |
|
|
|
} else if (rotate >= 360) { |
|
|
|
} else if (rotate >= 360) { |
|
|
@ -28558,7 +28567,7 @@ var Page = function PageClosure() { |
|
|
|
}, |
|
|
|
}, |
|
|
|
get annotations() { |
|
|
|
get annotations() { |
|
|
|
var annotations = []; |
|
|
|
var annotations = []; |
|
|
|
var annotationRefs = this.getInheritedPageProp('Annots') || []; |
|
|
|
var annotationRefs = this._getInheritableProperty('Annots') || []; |
|
|
|
for (var i = 0, n = annotationRefs.length; i < n; ++i) { |
|
|
|
for (var i = 0, n = annotationRefs.length; i < n; ++i) { |
|
|
|
var annotationRef = annotationRefs[i]; |
|
|
|
var annotationRef = annotationRefs[i]; |
|
|
|
var annotation = _annotation.AnnotationFactory.create(this.xref, annotationRef, this.pdfManager, this.idFactory); |
|
|
|
var annotation = _annotation.AnnotationFactory.create(this.xref, annotationRef, this.pdfManager, this.idFactory); |
|
|
@ -31844,7 +31853,10 @@ var AnnotationFactory = function () { |
|
|
|
case 'Text': |
|
|
|
case 'Text': |
|
|
|
return new TextAnnotation(parameters); |
|
|
|
return new TextAnnotation(parameters); |
|
|
|
case 'Widget': |
|
|
|
case 'Widget': |
|
|
|
var fieldType = _util.Util.getInheritableProperty(dict, 'FT'); |
|
|
|
var fieldType = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'FT' |
|
|
|
|
|
|
|
}); |
|
|
|
fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; |
|
|
|
fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; |
|
|
|
switch (fieldType) { |
|
|
|
switch (fieldType) { |
|
|
|
case 'Tx': |
|
|
|
case 'Tx': |
|
|
@ -32216,13 +32228,29 @@ var WidgetAnnotation = function (_Annotation) { |
|
|
|
var data = _this2.data; |
|
|
|
var data = _this2.data; |
|
|
|
data.annotationType = _util.AnnotationType.WIDGET; |
|
|
|
data.annotationType = _util.AnnotationType.WIDGET; |
|
|
|
data.fieldName = _this2._constructFieldName(dict); |
|
|
|
data.fieldName = _this2._constructFieldName(dict); |
|
|
|
data.fieldValue = _util.Util.getInheritableProperty(dict, 'V', true); |
|
|
|
data.fieldValue = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'V', |
|
|
|
|
|
|
|
getArray: true |
|
|
|
|
|
|
|
}); |
|
|
|
data.alternativeText = (0, _util.stringToPDFString)(dict.get('TU') || ''); |
|
|
|
data.alternativeText = (0, _util.stringToPDFString)(dict.get('TU') || ''); |
|
|
|
data.defaultAppearance = _util.Util.getInheritableProperty(dict, 'DA') || ''; |
|
|
|
data.defaultAppearance = (0, _util.getInheritableProperty)({ |
|
|
|
var fieldType = _util.Util.getInheritableProperty(dict, 'FT'); |
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'DA' |
|
|
|
|
|
|
|
}) || ''; |
|
|
|
|
|
|
|
var fieldType = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'FT' |
|
|
|
|
|
|
|
}); |
|
|
|
data.fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; |
|
|
|
data.fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; |
|
|
|
_this2.fieldResources = _util.Util.getInheritableProperty(dict, 'DR') || _primitives.Dict.empty; |
|
|
|
_this2.fieldResources = (0, _util.getInheritableProperty)({ |
|
|
|
data.fieldFlags = _util.Util.getInheritableProperty(dict, 'Ff'); |
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'DR' |
|
|
|
|
|
|
|
}) || _primitives.Dict.empty; |
|
|
|
|
|
|
|
data.fieldFlags = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'Ff' |
|
|
|
|
|
|
|
}); |
|
|
|
if (!Number.isInteger(data.fieldFlags) || data.fieldFlags < 0) { |
|
|
|
if (!Number.isInteger(data.fieldFlags) || data.fieldFlags < 0) { |
|
|
|
data.fieldFlags = 0; |
|
|
|
data.fieldFlags = 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -32285,13 +32313,20 @@ var TextWidgetAnnotation = function (_WidgetAnnotation) { |
|
|
|
|
|
|
|
|
|
|
|
var _this3 = _possibleConstructorReturn(this, (TextWidgetAnnotation.__proto__ || Object.getPrototypeOf(TextWidgetAnnotation)).call(this, params)); |
|
|
|
var _this3 = _possibleConstructorReturn(this, (TextWidgetAnnotation.__proto__ || Object.getPrototypeOf(TextWidgetAnnotation)).call(this, params)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dict = params.dict; |
|
|
|
_this3.data.fieldValue = (0, _util.stringToPDFString)(_this3.data.fieldValue || ''); |
|
|
|
_this3.data.fieldValue = (0, _util.stringToPDFString)(_this3.data.fieldValue || ''); |
|
|
|
var alignment = _util.Util.getInheritableProperty(params.dict, 'Q'); |
|
|
|
var alignment = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'Q' |
|
|
|
|
|
|
|
}); |
|
|
|
if (!Number.isInteger(alignment) || alignment < 0 || alignment > 2) { |
|
|
|
if (!Number.isInteger(alignment) || alignment < 0 || alignment > 2) { |
|
|
|
alignment = null; |
|
|
|
alignment = null; |
|
|
|
} |
|
|
|
} |
|
|
|
_this3.data.textAlignment = alignment; |
|
|
|
_this3.data.textAlignment = alignment; |
|
|
|
var maximumLength = _util.Util.getInheritableProperty(params.dict, 'MaxLen'); |
|
|
|
var maximumLength = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: dict, |
|
|
|
|
|
|
|
key: 'MaxLen' |
|
|
|
|
|
|
|
}); |
|
|
|
if (!Number.isInteger(maximumLength) || maximumLength < 0) { |
|
|
|
if (!Number.isInteger(maximumLength) || maximumLength < 0) { |
|
|
|
maximumLength = null; |
|
|
|
maximumLength = null; |
|
|
|
} |
|
|
|
} |
|
|
@ -32411,7 +32446,10 @@ var ChoiceWidgetAnnotation = function (_WidgetAnnotation3) { |
|
|
|
var _this5 = _possibleConstructorReturn(this, (ChoiceWidgetAnnotation.__proto__ || Object.getPrototypeOf(ChoiceWidgetAnnotation)).call(this, params)); |
|
|
|
var _this5 = _possibleConstructorReturn(this, (ChoiceWidgetAnnotation.__proto__ || Object.getPrototypeOf(ChoiceWidgetAnnotation)).call(this, params)); |
|
|
|
|
|
|
|
|
|
|
|
_this5.data.options = []; |
|
|
|
_this5.data.options = []; |
|
|
|
var options = _util.Util.getInheritableProperty(params.dict, 'Opt'); |
|
|
|
var options = (0, _util.getInheritableProperty)({ |
|
|
|
|
|
|
|
dict: params.dict, |
|
|
|
|
|
|
|
key: 'Opt' |
|
|
|
|
|
|
|
}); |
|
|
|
if (Array.isArray(options)) { |
|
|
|
if (Array.isArray(options)) { |
|
|
|
var xref = params.xref; |
|
|
|
var xref = params.xref; |
|
|
|
for (var i = 0, ii = options.length; i < ii; i++) { |
|
|
|
for (var i = 0, ii = options.length; i < ii; i++) { |
|
|
|