[PDFNet] Custom Sticky Note image

Hello Mike,

I believe there is some confusion over the purpose of the SetTextIconName selector. The name is not a path to an image file, but rather is used as a field to keep track of which icon is being shown. If the name is one of the pre-defined names that are documented as part of the PDF specification (listed below), then the corresponding default icon will be used by PDFNet.

Comment
Key
Help
NewParagraph
Paragraph
Insert
Note
Unknown

If you wish to use a custom icon, you will need to set the annotation’s appearance stream, which could in your case be an image. If the annotation has a custom appearance stream, the name field is ignored. For an example of how to set an annotation’s appearance stream, please see the following forum post:

https://groups.google.com/d/msg/pdfnet-sdk/2OKqnj07Nio/BxbbvojzdjsJ

The ElementBuilderTest sample project shows how to include an image using ElementBuilder:

http://www.pdftron.com/pdfnet/samplecode.html#ElementBuilder

Note that the iOS sample project only uses the image temporarily while the user is “creating” the annotation, for example while dragging their finger around the page before releasing it. The image is not added to the PDF because the icon is one of the standard PDF icons.

Best Regards,

James