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 to a PDF on iOS

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

PTPDFDoc *doc = [[PTPDFDoc alloc] initWithFilepath:filename];
PTPage *page = [doc GetPage:1];

// Create the sticky note (Text annotation)
PTText *txt =
    [PTText Create:[doc GetSDFDoc]
               pos:[[PTPDFRect alloc] initWithX1:10 y1:20 x2:30 y2:40]];
[txt SetTextIconName:@"UserIcon"];
[txt SetContents:@"The quick brown fox ate the lazy mouse."];
[txt SetColor:[[PTColorPt alloc] initWithX:0 y:1 z:0 w:0] numcomp:3];
[txt RefreshAppearance];
[page AnnotPushBack:txt];
let doc: PTPDFDoc = PTPDFDoc(filepath: filename)
let page: PTPage = doc.getPage(1)

// Create the sticky note (Text annotation)
let txt: PTText = PTText.create(doc.getSDFDoc(), pos: PTPDFRect(x1: 10, y1: 20, x2: 30, y2: 40))
txt.setTextIconName("UserIcon")
txt.setContents("The quick brown fox ate the lazy mouse.")
txt.setColor(PTColorPt(x: 0, y: 1, z: 0, w: 0), numcomp: 3)
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 to a PDF on iOS

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 highlight annotation to a PDF on iOS

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 free text annotation to a PDF on iOS

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 rectangle annotation to a PDF on iOS

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?