Type Definitions
-
DocumentInitParameters
-
Document initialization / loading parameters object.
Type:
- Object
- Source:
Properties:
Name Type Description urlstring The URL of the PDF. dataTypedArray | Array | string Binary PDF data. Use typed arrays (Uint8Array) to improve the memory usage. If PDF data is BASE64-encoded, use atob() to convert it to a binary string first. httpHeadersObject Basic authentication headers. withCredentialsboolean Indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies or authorization headers. The default is false. passwordstring For decrypting password-protected PDFs. initialDataTypedArray A typed array with the first portion or all of the pdf data. Used by the extension since some data is already loaded before the switch to range requests. lengthnumber The PDF file length. It's used for progress reports and range requests operations. rangePDFDataRangeTransport -
PDFDocumentStats
-
Type:
- Object
- Source:
Properties:
Name Type Description streamTypesArray Used stream types in the document (an item is set to true if specific stream ID was used in the document). fontTypesArray Used font type in the document (an item is set to true if specific font ID was used in the document). -
PDFOperatorList
-
PDF page operator list.
Type:
- Object
- Source:
Properties:
Name Type Description fnArrayArray Array containing the operator functions. argsArrayArray Array containing the arguments of the functions. -
PromiseCapability
-
Promise Capability object.
Type:
- Object
- Source:
Properties:
Name Type Description promisePromise A promise object. resolvefunction Fullfills the promise. rejectfunction Rejects the promise. -
RenderParameters
-
Page render parameters.
Type:
- Object
- Source:
Properties:
Name Type Description canvasContextObject A 2D context of a DOM Canvas object. viewportPDFJS.PageViewport Rendering viewport obtained by calling of PDFPage.getViewport method. intentstring Rendering intent, can be 'display' or 'print' (default value is 'display'). imageLayerObject (optional) An object that has beginLayout, endLayout and appendImage functions. continueCallbackfunction (deprecated) A function that will be called each time the rendering is paused. To continue rendering call the function that is the first argument to the callback. -
TextContent
-
Page text content.
Type:
- Object
- Source:
Properties:
Name Type Description itemsarray array of TextItem stylesObject TextStyles objects, indexed by font name. -
TextItem
-
Page text content part.
Type:
- Object
- Source:
Properties:
Name Type Description strstring text content. dirstring text direction: 'ttb', 'ltr' or 'rtl'. transformarray transformation matrix. widthnumber width in device space. heightnumber height in device space. fontNamestring font name used by pdf.js for converted font. -
TextStyle
-
Text style.
Type:
- Object
- Source:
Properties:
Name Type Description ascentnumber font ascent. descentnumber font descent. verticalboolean text is in vertical mode. fontFamilystring possible font family