PdfAnnotationCollection

public final class PdfAnnotationCollection implements Iterable<T>

Represents a collection of annotations on a PDF page. Provides methods to access, add, and remove annotations.

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
public final PdfCircleAnnotation addCircle(float x, float y, float width, float height, String author, String contents)
Adds a circle (ellipse) annotation to this page.
Link copied to clipboard
public final PdfFreeTextAnnotation addFreeText(float x, float y, float width, float height, String author, String contents, String fontName, float fontSize, Color fontColor)
Adds a free text annotation (text box) to this page.
Link copied to clipboard
public final PdfHighlightAnnotation addHighlight(float x, float y, float width, float height, String author, String contents)
Adds a highlight annotation to this page.
Link copied to clipboard
public final PdfLineAnnotation addLine(float startX, float startY, float endX, float endY, String author, String contents)
Adds a line annotation to this page.
Link copied to clipboard
public final PdfLinkAnnotation addLink(float x, float y, float width, float height)
Adds an empty link annotation to this page.
Link copied to clipboard
public final PdfRedactAnnotation addRedact(float x, float y, float width, float height)
Adds a redaction annotation to this page.
Link copied to clipboard
public final PdfSquareAnnotation addSquare(float x, float y, float width, float height, String author, String contents)
Adds a square (rectangle) annotation to this page.
Link copied to clipboard
public final PdfSquigglyAnnotation addSquiggly(float x, float y, float width, float height, String author, String contents)
Adds a squiggly underline annotation to this page.
Link copied to clipboard
public final PdfStampAnnotation addStamp(float x, float y, float width, float height, String title, String contents)
Adds a rubber stamp annotation to this page.
Link copied to clipboard
public final PdfTextAnnotation addStickyNote(float x, float y, String author, String subject, String contents)
Adds a sticky note (text) annotation to this page.
Link copied to clipboard
public final PdfStrikeOutAnnotation addStrikeOut(float x, float y, float width, float height, String author, String contents)
Adds a strikeout annotation to this page.
Link copied to clipboard
public final PdfUnderlineAnnotation addUnderline(float x, float y, float width, float height, String author, String contents)
Adds an underline annotation to this page.
Link copied to clipboard
public void forEach(Consumer<? super T> action)
Link copied to clipboard
public final PdfAnnotation get(int index)
Returns the element at the specified position in this collection.
Link copied to clipboard
public final int getCount()
Gets the number of annotations in the collection.
Link copied to clipboard
public final long getEnumerator()
Returns an enumerator that iterates through the annotation's collection.
Link copied to clipboard
Returns an iterator over the elements in this collection.
Link copied to clipboard
public final void removeAt(int index)
Removes the annotation at the specified index.
Link copied to clipboard
public final int size()
Returns the number of elements in this collection.
Link copied to clipboard