@ironsoftware/ironpdf
Version:
IronPDF for Node
30 lines • 1.63 kB
TypeScript
import { PdfiumWrappedPdfAnnotationP__Output } from "../../generated_proto/ironpdfengineproto/PdfiumWrappedPdfAnnotationP";
import { LinkAnnotation } from "../../../public/annotation";
/**
* Retrieve all heterogeneous annotations (text, free-text, link, ...) on a single page
* via the {@code Pdfium_Annotation_GetAnnotations} unary RPC.
*
* The returned wrapped annotations carry one of the proto sub-types ({@code text},
* {@code freetext}, {@code link}). Callers inspect the {@code annotations} oneof to
* dispatch by sub-type.
*/
export declare function getAnnotations(id: string, pageIndex: number): Promise<PdfiumWrappedPdfAnnotationP__Output[]>;
/**
* Add an internal hyperlink annotation to the document. The link navigates to a
* destination page within the same PDF when clicked.
*
* <p>Reuses the existing {@code Pdfium_Annotation_AddLinkAnnotation} RPC by encoding
* the destination parameters into a special URL format:
* {@code x-ironpdf-goto-page:{destPage},{destType},{left},{right},{top},{bottom},{zoom},{showBorder}}.
* The engine detects this prefix and routes the request to its internal link handler.</p>
*
* <p>Mirrors {@code IronPdf.Engines.Pdfium.GrpcPdfClient.AddInternalLinkAnnotation}
* on the C# side.</p>
*/
export declare function addLinkAnnotation(id: string, link: LinkAnnotation): Promise<void>;
/**
* Retrieve the number of annotations contained on the specified page via the
* {@code Pdfium_Annotation_GetAnnotationCount} unary RPC.
*/
export declare function getAnnotationCount(id: string, pageIndex: number): Promise<number>;
//# sourceMappingURL=annotations.d.ts.map