For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create annotations

A variety of annotations can be created such as sticky note (text annotations), link annotations, stamp annotations, and more.

Add text annotation (sticky note) to PDFs

To add a sticky note (text annotation) to a PDF Document.

PDFDoc doc = new PDFDoc(filename);
Page page = doc.getPage(1);

// Create the sticky note (Text annotation)
Text txt = Text.create(doc, new Rect( 10, 20, 30, 40 ));
txt.setIcon("UserIcon");
txt.setContents("The quick brown fox ate the lazy mouse.");
txt.setColor(new ColorPt(0,1,0));
txt.refreshAppearance();
page.annotPushBack(txt);
val doc = PDFDoc(filename)
val page = doc.getPage(1)

// Create the sticky note (Text annotation)
val txt = Text.create(doc, Rect(10.0, 20.0, 30.0, 40.0))
txt.setIcon("UserIcon")
txt.contents = "The quick brown fox ate the lazy mouse."
txt.setColor(ColorPt(0.0,1.0,0.0))
txt.refreshAppearance()
page.annotPushBack(txt)

Add or edit PDF annotations Full code sample which shows how to add or edit PDF annotations (e.g. hyperlink, intra-document link, stamp, rubber stamp, file attachment, sound, text, free-text, line, circle, square, polygon, polyline, highlight, squiggly, caret, and ink).

Add a stamp annotation

A stamp in a PDF document is analogous to applying a rubber stamp on a paper document.

Apryse SDK benefits include:

  • Stamp PDF pages with text, images, or with other PDF pages.

  • Embed fonts and images, and copy graphical elements from one page to another.

Use Stamper to stamp content (text, image, PDF page)

To stamp text, image, and a PDF page to a PDF document.

Stamp a PDF File Full code sample which shows how to stamp PDF pages with text, images, or with other PDF pages and how to add new content (or watermark).

About Stamper

Stamper can be used for PDF pages with text, images, or with other PDF content in only a few lines of code. Although Stamper is very simple to use compared to ElementBuilder/ElementWriter it is not as powerful or flexible. In case you need full control over PDF creation use ElementBuilder/ElementWriter to add new content to existing PDF pages as shown in the ElementBuilder sample project .

Add a highlight annotation to a PDF in Android

To add a highlight annotation to a PDF Document page.

Add or edit PDF annotations sample Full code sample which shows how to add or edit PDF annotations (e.g. hyperlink, intra-document link, stamp, rubber stamp, file attachment, sound, text, free-text, line, circle, square, polygon, polyline, highlight, squiggly, caret, and ink).

Add a free text annotation to a PDF in Android

To add a free text annotation to a PDF Document page.

Add or edit PDF annotations sample Full code sample which shows how to add or edit PDF annotations (e.g. hyperlink, intra-document link, stamp, rubber stamp, file attachment, sound, text, free-text, line, circle, square, polygon, polyline, free text, squiggly, caret, and ink).

Add a rectangle annotation to a PDF in Android

To add a rectangle annotation to a PDF Document page.

Add or edit PDF annotations sample Full code sample which shows how to add or edit PDF annotations (e.g. hyperlink, intra-document link, stamp, rubber stamp, file attachment, sound, text, free-text, line, circle, square, polygon, polyline, rectangle, squiggly, caret, and ink).

Last updated

Was this helpful?