public class AnnotationManager extends Object
PdfDocument.
| Constructor and Description |
|---|
AnnotationManager(com.ironsoftware.ironpdf.internal.staticapi.InternalPdfDocument internalPdfDocument)
Please get AnnotationManager by
PdfDocument.getAnnotation() instead. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLinkAnnotation(LinkAnnotation link)
Adds a clickable link annotation that navigates to another page within the same PDF document.
|
void |
addTextAnnotation(AnnotationOptions options,
int pageIndex)
Adds an annotation to a page of this
InternalPdfDocument |
int |
getAnnotationCount(int pageIndex)
Retrieves the number of annotations contained on the specified page
|
public AnnotationManager(com.ironsoftware.ironpdf.internal.staticapi.InternalPdfDocument internalPdfDocument)
PdfDocument.getAnnotation() instead.internalPdfDocument - the internal pdf documentpublic void addTextAnnotation(AnnotationOptions options, int pageIndex)
InternalPdfDocumentoptions - The annotation options as a AnnotationOptions object.pageIndex - Index of the page to add the annotation. The first page has a PageIndex of 0public void addLinkAnnotation(LinkAnnotation link)
The target page and display options are configured via the LinkAnnotation fields
(see LinkAnnotation.setDestinationPageIndex(int),
LinkAnnotation.setDestinationType(com.ironsoftware.ironpdf.bookmark.BookmarkDestinations),
and related setters). The clickable area is set via
LinkAnnotation.setX(int)/LinkAnnotation.setY(int)/
LinkAnnotation.setWidth(int)/LinkAnnotation.setHeight(int).
On successful add, LinkAnnotation.getAnnotationIndex() is updated to the
zero-based index of the new annotation on its page.
link - the link annotation to addpublic int getAnnotationCount(int pageIndex)
pageIndex - Index of the page to get the annotation. The first page has a PageIndex of 0Copyright © 2022–2026 Iron Software. All rights reserved.