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 document with Xamarin viewer
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);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 link annotation to a document with Xamarin viewer
To add a hyperlink or intra-document link annotation to a PDF Document page.
PDFDoc doc = new PDFDoc(filename);
Page page = doc.GetPage(1);
// Create a hyperlink
Link hyperlink = Link.Create(doc, new Rect(85, 570, 503, 524), Action.CreateURI(doc, "http://www.apryse.com"));
hyperlink.RefreshAppearance();
page.AnnotPushBack(hyperlink);
// Create an intra-document link
Action goto_page_3 = Action.CreateGoto(Destination.CreateFitH(doc.GetPage(3), 0));
Link link = Link.Create(doc, new Rect(85, 458, 503, 502), goto_page_3);
link.RefreshAppearance();
page.AnnotPushBack(link);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 stamp annotation to a PDF in Xamarin
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 hihglight annotation to a PDF in Xamarin
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 in Xamarin
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 in Xamarin
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?