UNPKG

@syncfusion/ej2-pdf

Version:

Feature-rich JavaScript PDF library with built-in support for loading and manipulating PDF document.

892 lines (891 loc) 30.2 kB
import { PdfTextStyle } from './enumerator'; import { _PdfCrossReference } from './pdf-cross-reference'; import { PdfDestination } from './pdf-page'; import { _PdfDictionary, _PdfReference } from './pdf-primitives'; import { PdfColor } from './pdf-type'; /** * Represents a base class for all bookmark objects. * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Destroy the document * document.destroy(); * ``` */ export declare class PdfBookmarkBase { /** * Outline dictionary associated with this bookmark collection. * * @private */ _dictionary: _PdfDictionary; /** * Cross reference table for the current document. * * @private */ _crossReference: _PdfCrossReference; /** * Cached list of child bookmarks. * * @private */ _bookMarkList: PdfBookmark[]; /** * Resolved page destination for this bookmark. * * @private */ _destination: PdfDestination; /** * Bookmark text color. * * @private */ _color: PdfColor; /** * Indicates whether the node is expanded in the outline tree. * * @private */ _isExpanded: boolean; /** * Named destination associated with this bookmark. * * @private */ _namedDestination: PdfNamedDestination; /** * Cached bookmark title text. * * @private */ _title: string; /** * Bookmark text rendering style. * * @private */ _textStyle: PdfTextStyle; /** * Indicates whether this bookmark has been loaded from an existing document. * * @private */ _isLoadedBookmark: boolean; /** * Indirect reference of this outline entry. * * @private */ _reference: _PdfReference; /** * Initializes a new instance of the `PdfBookmarkBase` class. * * @private * @param {_PdfDictionary} dictionary Outline dictionary. * @param {_PdfCrossReference} crossReference Cross reference. * */ constructor(dictionary: _PdfDictionary, crossReference: _PdfCrossReference); /** * Gets the bookmark count (Read only). * * @returns {number} Number of bookmarks. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Get bookmark count * let bookmarkCount: number = bookmarks.count; * // Destroy the document * document.destroy(); * ``` */ readonly count: number; /** * Gets the boolean flag indicating whether the bookmark is expanded or not. * * @returns {boolean} whether the bookmark is expanded or not. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the boolean flag indicating whether the bookmark is expanded or not * let isExpanded: boolean = bookmark.isExpanded; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the boolean flag indicating whether the bookmark is expanded or not. * * @param {boolean} value whether the bookmark is expanded or not. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Sets the boolean flag indicating whether the bookmark is expanded or not * bookmark.isExpanded = true; * // Destroy the document * document.destroy(); * ``` */ isExpanded: boolean; /** * Gets the `PdfBookmark` at the specified index. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Get bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Destroy the document * document.destroy(); * ``` * * @param {number} index Bookmark index. * @returns {PdfBookmark} Bookmark at the specified index. */ at(index: number): PdfBookmark; /** * Gets the boolean flag indicating whether `PdfBookmark` is present or not. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Get the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the boolean flag indicating whether `PdfBookmark` is present or not. * let isPresent: boolean = bookmarks.contains(bookmark); * // Destroy the document * document.destroy(); * ``` * * @param {PdfBookmark} outline Bookmark. * @returns {boolean} whether the bookmark is present or not. */ contains(outline: PdfBookmark): boolean; /** * Creates and adds a new outline to the PDF document. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Access the first page of the PDF * let page: PdfPage = document.getPage(0); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Add a new outline to the PDF document * let bookmark: PdfBookmark = bookmarks.add('Introduction'); * // Sets destination to the bookmark * bookmark.destination = new PdfDestination(page, {x: 10, y: 10}); * // Destroy the document * document.destroy(); * ``` * * @param {string} title The title of the outline. * @returns {PdfBookmark} PDF bookmark. */ add(title: string): PdfBookmark; /** * Adds a new outline (bookmark) with title and optional properties to the PDF document . * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Access the first page of the PDF * let page: PdfPage = document.getPage(0); * // Add a new bookmark with destination * let bookmark: PdfBookmark = document.bookmarks.add('Introduction', { * destination: new PdfDestination(page, { x: 10, y: 10 }, { zoom: 1 }), * namedDestination: new PdfNamedDestination('First', new PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })), * color: { r: 0, g: 0, b: 255 }, * textStyle: PdfTextStyle.bold}); * // Destroy the document * document.destroy(); * ``` * * @param {string} title The title of the bookmark. * @param {object} [options] Optional parameters for the bookmark. * @param {PdfDestination} [options.destination] The destination within the PDF. * @param {PdfNamedDestination} [options.namedDestination] A named destination reference. * @param {PdfColor} [options.color] The color of the bookmark text. * @param {PdfTextStyle} [options.textStyle] The style of the bookmark text. * @returns {PdfBookmark} The newly created PDF bookmark. */ add(title: string, options: { destination?: PdfDestination; namedDestination?: PdfNamedDestination; color?: PdfColor; textStyle?: PdfTextStyle; }): PdfBookmark; /** * Insert a new outline to the PDF document at specified index. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Access the first page of the PDF * let page: PdfPage = document.getPage(0); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Add a new outline to the PDF document * let bookmark: PdfBookmark = bookmarks.add('Introduction'); * // Sets destination to the bookmark * bookmark.destination = new PdfDestination(page, {x: 10, 10}); * // Destroy the document * document.destroy(); * ``` * * @param {string} title The title of the outline. * @param {index} index The index to insert. * @returns {PdfBookmark} PDF bookmark. */ add(title: string, index: number): PdfBookmark; /** * Adds a new outline (bookmark) to the PDF document. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Access the first page of the PDF * let page: PdfPage = document.getPage(0); * // Add a new bookmark with destination * let bookmark: PdfBookmark = document.bookmarks.add('Introduction', 0, { * destination: new PdfDestination(page, { x: 10, y: 10 }, {zoom: 1 }), * namedDestination: new PdfNamedDestination('First', new PdfDestination(page, { x: 0, y: 10 }, {zoom: 1 })), * color: { r: 0, g: 0, b: 255 }, * textStyle: PdfTextStyle.bold}); * // Destroy the document * document.destroy(); * ``` * * @param {string} title The title of the bookmark. * @param {number} index The index at which to insert the bookmark. * @param {object} [options] Optional parameters for the bookmark. * @param {PdfDestination} [options.destination] The destination within the PDF. * @param {PdfNamedDestination} [options.namedDestination] A named destination reference. * @param {PdfColor} [options.color] The color of the bookmark text. * @param {PdfTextStyle} [options.textStyle] The style of the bookmark text. * @returns {PdfBookmark} The newly created PDF bookmark. */ add(title: string, index: number, options: { destination?: PdfDestination; namedDestination?: PdfNamedDestination; color?: PdfColor; textStyle?: PdfTextStyle; }): PdfBookmark; /** * Remove specified bookmark from the document. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Access the first page of the PDF * let page: PdfPage = document.getPage(0); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Remove specified bookmark from the document. * bookmarks.remove('Introduction'); * // Sets destination to the bookmark * bookmark.destination = new PdfDestination(page, {x: 10, 10}); * // Destroy the document * document.destroy(); * ``` * * @param {string} title The title of the outline. * @returns {void} nothing. */ remove(title: string): void; /** * Remove the bookmark from the document at the specified index. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Access the first page of the PDF * let page: PdfPage = document.getPage(0); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Remove the bookmark from the document at the index 1. * bookmarks.remove(1); * // Sets destination to the bookmark * bookmark.destination = new PdfDestination(page, {x: 10, 10}); * // Destroy the document * document.destroy(); * ``` * * @param {number} index The index. */ remove(index: number): void; /** * Removes all the bookmark from the collection. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Remove all the bookmark from the collection. * bookmarks.clear(); * // Get count after removal of all outlines. * let count: number = bookmarks.count; * // Destroy the document * document.destroy(); * ``` * * @returns {void} Nothing. */ clear(): void; /** * Removes the 'First' entry from the specified outline dictionary. * * @private * @param {_PdfDictionary} dictionary Outline dictionary to update. * @returns {void} nothing. */ _removeFirst(dictionary: _PdfDictionary): void; /** * Removes the 'Last' entry from the specified outline dictionary. * * @private * @param {_PdfDictionary} dictionary Outline dictionary to update. * @returns {void} nothing. */ _removeLast(dictionary: _PdfDictionary): void; /** * Removes the 'Next' entry from the specified outline dictionary. * * @private * @param {_PdfDictionary} dictionary Outline dictionary to update. * @returns {void} nothing. */ _removeNext(dictionary: _PdfDictionary): void; /** * Removes the 'Prev' entry from the specified outline dictionary. * * @private * @param {_PdfDictionary} dictionary Outline dictionary to update. * @returns {void} nothing. */ _removePrevious(dictionary: _PdfDictionary): void; /** * Removes the 'Count' entry from the specified outline dictionary. * * @private * @param {_PdfDictionary} dictionary Outline dictionary to update. * @returns {void} nothing. */ _removeCount(dictionary: _PdfDictionary): void; /** * Updates the in-memory child list by inserting or removing an entry at the specified index. * * @private * @param {number} index Zero-based index where the change is applied. * @param {PdfBookmark} [bookmark] Bookmark to insert; omitted to remove at the index. * @returns {void} nothing. */ _updateBookmarkList(index: number, bookmark?: PdfBookmark): void; /** * Synchronizes the 'Count' value on the parent dictionary based on expansion state. * * @private * @returns {void} nothing. */ _updateCount(): void; /** * Recreates the in-memory children list by walking the linked outline nodes. * * @private * @returns {void} nothing. */ _reproduceTree(): void; /** * Fetches the first or last child bookmark for the specified container. * * @private * @param {PdfBookmarkBase} bookmarkBase Bookmark container whose child is requested. * @param {boolean} [isFirst=true] When true, fetches the first child; otherwise the last. * @returns {PdfBookmark} The resolved child bookmark, if present. */ _getBookmark(bookmarkBase: PdfBookmarkBase, isFirst?: boolean): PdfBookmark; } /** * Represents a bookmark in a PDF document * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Destroy the document * document.destroy(); * ``` */ export declare class PdfBookmark extends PdfBookmarkBase { /** * Initializes a new instance of the `PdfBookmark` class. * * @private * @param {_PdfDictionary} dictionary Bookmark dictionary. * @param {_PdfCrossReference} crossReference Cross reference. * */ constructor(dictionary: _PdfDictionary, crossReference: _PdfCrossReference); /** * Gets the destination. * * @returns {PdfDestination} Page destination. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the destination * let destination: PdfDestination = bookmark.destination; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the destination. * * @param {PdfDestination} value destination. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Set the destination * bookmark.destination = new PdfDestination(page, {x: 100, 200}); * // Save the document * document.save('output.pdf'); * // Destroy the document * document.destroy(); * ``` */ destination: PdfDestination; /** * Gets the named destination. * * @returns {PdfNamedDestination} Named destination. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the named destination. * * @param {PdfNamedDestination} value Named destination. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Destroy the document * document.destroy(); * ``` */ namedDestination: PdfNamedDestination; /** * Gets the bookmark title. * * @returns {string} Bookmark title. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the bookmark title * let bookmarkTitle: string = bookmark.title; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the bookmark title. * * @param {string} value Bookmark title. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Sets the bookmark title * bookmark.title = 'Syncfusion'; * // Destroy the document * document.destroy(); * ``` */ title: string; /** * Gets the bookmark color. * * @returns {PdfColor} Bookmark color. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the bookmark color * let color: PdfColor = bookmark.color; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the bookmark color. * * @param {PdfColor} value Bookmark color. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Sets the bookmark color * bookmark.color = {r: 255, g: 0, b: 0}; * // Destroy the document * document.destroy(); * ``` */ color: PdfColor; /** * Gets the text style. * * @returns {PdfTextStyle} Text style. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the textStyle * let textStyle: PdfTextStyle = bookmark.textStyle; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the text style. * * @param {PdfTextStyle} value Text style. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Sets the textStyle * bookmark.textStyle = PdfTextStyle.italic; * // Destroy the document * document.destroy(); * ``` */ textStyle: PdfTextStyle; /** * Gets the next sibling bookmark in the linked list. * * @private * @returns {PdfBookmark} Next bookmark in the sequence. */ readonly _next: PdfBookmark; /** * Updates the dictionary flag that stores the text style for this bookmark. * * @private * @param {PdfTextStyle} value Text style to apply. * @returns {void} nothing. */ _updateTextStyle(value: PdfTextStyle): void; /** * Determines the text style from the outline entry flags. * * @private * @returns {PdfTextStyle} Computed text style. */ _obtainTextStyle(): PdfTextStyle; /** * Resolves and returns the named destination referenced by this bookmark. * * @private * @returns {PdfNamedDestination} The resolved named destination, if available. */ _obtainNamedDestination(): PdfNamedDestination; } /** * Represents a named destination in a PDF document. * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Destroy the document * document.destroy(); * ``` */ export declare class PdfNamedDestination { /** * @private */ _destination: PdfDestination; /** * @private */ _title: string; /** * @private */ _dictionary: _PdfDictionary; /** * @private */ _crossReference: _PdfCrossReference; /** * Initializes a new instance of the `PdfNamedDestination` class. * * @param {string} title The title. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Sets the named destination * bookmark.namedDestination = new PdfNamedDestination('Chapter 1'); * // Destroy the document * document.destroy(); * ``` */ constructor(title: string); /** * Initializes a new instance of the `PdfNamedDestination` class. * * @param {string} title The title. * @param {PdfDestination} destination Destination page. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Sets the named destination * bookmark.namedDestination = new PdfNamedDestination('Chapter 1', new PdfDestination( * page: document.getPage(0), { * location: { x: 50, y: 50 }}); * // Destroy the document * document.destroy(); * ``` */ constructor(title: string, destination: PdfDestination); /** * Initializes a new instance of the `PdfNamedDestination` class. * * @private * @param {_PdfDictionary} dictionary Destination dictionary. * @param {_PdfCrossReference} crossReference Cross reference. * */ constructor(dictionary: _PdfDictionary, crossReference: _PdfCrossReference); /** * Gets the destination. * * @returns {PdfDestination} Page destination. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Gets the destination * let destination: PdfDestination = namedDestination.destination; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the destination. * * @param {PdfDestination} value destination. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Set the destination * namedDestination.destination = new PdfDestination(page, {x: 100, 200}); * // Save the document * document.save('output.pdf'); * // Destroy the document * document.destroy(); * ``` */ destination: PdfDestination; /** * Gets the title. * * @returns {string} title. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Gets the title * let title: string = namedDestination.title; * // Destroy the document * document.destroy(); * ``` */ /** * Sets the title. * * @param {string} value title. * * ```typescript * // Load an existing PDF document * let document: PdfDocument = new PdfDocument(data, password); * // Get the bookmarks * let bookmarks: PdfBookmarkBase = document.bookmarks; * // Gets the bookmark at the specified index * let bookmark: PdfBookmark = bookmarks.at(0) as PdfBookmark; * // Gets the named destination * let namedDestination: PdfNamedDestination = bookmark.namedDestination; * // Set the title * namedDestination.title = 'Syncfusion'; * // Save the document * document.save('output.pdf'); * // Destroy the document * document.destroy(); * ``` */ title: string; /** * Updates the Names tree entry when the named destination title changes. * * @private * @param {string} value New title to set. * @param {string} previousTitle Previous title to replace. * @returns {void} nothing. */ _updateNamedDestinationTitle(value: string, previousTitle: string): void; /** * Initializes the internal dictionary for a 'GoTo' named destination action. * * @private * @returns {void} nothing. */ _initialize(): void; } /** * Parses and maintains the document's named destination collection for fast lookup. * * @private */ export declare class _PdfNamedDestinationCollection { /** * Root Names dictionary that contains destinations. * * @private */ _dictionary: _PdfDictionary; /** * Cross-reference context for object lookups. * * @private */ _crossReference: _PdfCrossReference; /** * Flattened list of resolved named destinations. * * @private */ _namedDestinations: PdfNamedDestination[]; constructor(); constructor(dictionary: _PdfDictionary, crossReference: _PdfCrossReference); private _findDestination; /** * Reads a Names array entry and populates the named destinations cache. * * @private * @param {_PdfDictionary} destination The dictionary containing a 'Names' array. * @returns {void} nothing. */ _addCollection(destination: _PdfDictionary): void; }