I need to draw a custom Cloud annotation with PDFTron ? Please share me any sample code if you have, i tried drawing a polygon with cloud border style exist in pdftron but that did not work.
Hey man, did you manage to find a way around drawing a custom annotation?
Hi, to add a custom appearance to an annotation, see this forum post.
The above just adds an image, but you can add any content you like. See the ElementBuilder sample on how to add text and paths.
Note though, that if someone opens up the PDF in a different PDF reader, and resizes the annotation, or in the case of freetext, changes the text, then your custom appearance would be lost. Moving is fine though.
Furthermore, for your own viewer, you will need to hook into the event in tools for resizing your annotation, and trigger your custom drawing, or again it will revert to the default. Again, you don’t need to do anything for moving of the annotation.