;
/**
* Clears the cached result of {@link getElementLocations}, forcing a fresh scan of the
* document's annotations on the next call. Call this if you've modified the document's
* annotations or structure after rendering.
*/
resetElementLocationCache(): void;
/**
* Retrieves all outline bookmarks (table-of-contents entries) in this PDF document.
*
* Bookmarks are returned as a flat list with parent linkage via
* {@link Bookmark.parentItemId}. Roots have an empty {@code parentItemId}.
* Use {@link Bookmark.hierarchy} for depth information.
*
* Auto-bookmarks generated from HTML headings (via
* {@link ChromePdfRenderOptions.autoBookmarksFromHeadings}) are included.
*
* Mirrors {@code IronPdf.PdfDocument.Bookmarks} on the C# side.
*
* @returns A list of {@link Bookmark} objects, sorted in document order.
* Returns an empty list if the document has no bookmarks.
*/
getBookmarks(): Promise;
/**
* Adds a clickable internal hyperlink annotation that navigates to another page within
* the same PDF document. Useful for building custom tables of contents, cross-references,
* and in-document navigation.
*
* The target page and display options are configured via the {@link LinkAnnotation}
* fields ({@code destinationPageIndex}, {@code destinationType}, etc.).
*
* Mirrors {@code IronPdf.Annotations.LinkAnnotation} on the C# side.
*
* @example
* ```ts
* await pdf.addLinkAnnotation({
* pageIndex: 0,
* destinationPageIndex: 3,
* x: 72, y: 700,
* width: 300, height: 18,
* contents: "Chapter 1",
* });
* ```
*/
addLinkAnnotation(link: LinkAnnotation): Promise;
/**
* Retrieves the number of annotations contained on the specified page.
*
* @param pageIndex Zero-based page index. The first page has a page index of 0.
*/
getAnnotationCount(pageIndex: number): Promise;
/**
* Gets information of all pages in the PdfDocument
*/
getPagesInfo(): Promise;
/**
* Gets the number of pages in the PdfDocument.
*/
getPageCount(): Promise;
/**
* Set the page orientation.
* @param pageRotation see {@link PageRotation}
* @param options including {@link PdfPageSelection}
*/
setRotation(pageRotation: PageRotation, options?: {
/**
* @default "all"
*/
pdfPageSelection?: PdfPageSelection | undefined;
} | undefined): Promise;
/**
* Resize a page to the specified dimensions
* @param newSize {@link PdfPaperSize}
* @param options including {@link PdfPageSelection}
*/
resize(newSize: PdfPaperSize, options?: {
/**
* @default "all"
*/
pdfPageSelection?: PdfPageSelection | undefined;
} | undefined): Promise;
/**
* Adds another PDF to the beginning of the current PdfDocument
* If AnotherPdfFile contains form fields, those fields will be appended with '_' in the resulting PDF. e.g. 'Name' will be 'Name_'
* @param fromPdfDocument PdfDocument to prepend
*/
prependAnotherPdf(fromPdfDocument: PdfDocument): Promise;
/**
* Appends another PDF to the end of the current
* If AnotherPdfFile contains form fields, those fields will be appended with '_' in the resulting PDF. e.g. 'Name' will be 'Name_'
* @param fromPdfDocument PdfDocument to Append
*/
appendAnotherPdf(fromPdfDocument: PdfDocument): Promise;
/**
* Inserts another PDF into the current PdfDocument, starting at a given Page Index.
* If AnotherPdfFile contains form fields, those fields will be appended with '_' in the resulting PDF. e.g. 'Name' will be 'Name_'
* @param fromPdfDocument Another PdfDocument
* @param insertAtPageIndex Index at which to insert the new content. Note: Page 1 has index 0...
*/
insertPagesFromAnotherPdf(fromPdfDocument: PdfDocument, insertAtPageIndex: number): Promise;
/**
* Removes a range of pages from the PDF
* @param pages pages to remove
*/
removePage(pages: PdfPageSelection): Promise;
/**
* Creates a new PDF by copying a range of pages from this {@link PdfDocument}.
* @param pages pages to copy (default "all")
*/
duplicate(pages?: PdfPageSelection): Promise;
/**
* Finds all embedded Images from within a specified pages in the PDF and returns them as Buffer
* @param options including {@link PdfPageSelection}
*/
extractRawImages(options?: {
/**
* @default "all"
*/
fromPages?: PdfPageSelection;
} | undefined): Promise;
/**
* Renders the PDF and exports image Files in convenient formats. 1 image file is created for each
* page.
*
* @param options including {@link PdfPageSelection} {@link ImageType}
*
* @return array of images as Buffer[]
*/
rasterizeToImageBuffers(options?: {
/**
* @default "all"
*/
fromPages?: PdfPageSelection | undefined;
/**
* @default {@link ImageType.PNG}
*/
imageType?: ImageType | undefined;
} | undefined): Promise;
/**
* Renders the PDF and exports image Files in convenient formats. 1 image file is created for each
* page. Running number will append output file path.
*
* @param filePath output file path.
* @param options including {@link PdfPageSelection} {@link ImageType}
*
* @return array of images file name as string[]
*/
rasterizeToImageFiles(filePath: string, options?: {
/**
* @default "all"
*/
fromPages?: PdfPageSelection | undefined;
/**
* @default {@link ImageType.PNG}
*/
type?: ImageType | undefined;
} | undefined): Promise;
/**
* Replace the specified old text with new text on a given page
* @param oldText Old text to remove
* @param newText New text to add
* @param onPages Page index to search for old text to replace (default "all")
*/
replaceText(oldText: string, newText: string, onPages?: PdfPageSelection | undefined): Promise;
extractText(onPages?: PdfPageSelection | undefined): Promise;
/**
* Convert the current document into the specified PDF-A standard format
* @param pdfaVersion The PDF/A version to convert to (default: PdfA3b)
* @param customICC (Optional) Custom color profile file path
*/
convertToPdfA(pdfaVersion?: PdfAVersions, customICC?: string | undefined): Promise;
/**
* Render HTML to PDF and convert to PDF/UA format with screen reader support.
* Produces a proper semantic structure tree (Sect → H1, P, etc.) for accessibility.
* @param html The HTML string to render
* @param naturalLanguages Document language for screen readers (default: English)
* @param options Optional render options
*/
static fromHtmlAsPdfUA(html: string, naturalLanguages?: NaturalLanguages, options?: {
renderOptions?: ChromePdfRenderOptions | undefined;
} | undefined): Promise;
/**
* Convert the current document into the specified PDF/UA standard format
*/
convertToPdfUA(naturalLanguages: NaturalLanguages, pdfUaVersion?: PdfUAVersions): Promise;
/**
* Gets a Map of metadata properties
*/
getMetadata(): Promise