Add the border in the specific area using PDFTron.net

Hi,
I have listed all annotations in the comment panel as same as the Comment panel in Adobe Reader. I also know how to show the page.
However, I need to add the border on that annotation. Is it any sample project or would you tell me the code example or process. thanks in advance.

How about using annot.SetBorderStyle(bs).

pdftron.PDF.Annot.BorderStyle:
http://www.pdftron.com/pdfnet/PDFNet/html/AllMembers_T_pdftron_PDF_Annot_BorderStyle.htm

Don’t forget to call annot.RefreshAppearance() any time you finish modifying properties on an annotation

Thanks for respond. I tried the SetBorderStyle, but it is only work on e_freeText in my code and the borderstyle is solid. By the way, I only want to see it on screen, not actually add it on the annotation. If I use the SetBorderStyle method, how I move it back when the user click on any area on my form?

the following is my code to add the border as you mentioned.

switch (commentAnnot.GetType())

{

case Annot.Type.e_Text:

case Annot.Type.e_Highlight:
case Annot.Type.e_Line:
case Annot.Type.e_Squiggly:
case Annot.Type.e_Underline:
case Annot.Type.e_FreeText:
case Annot.Type.e_Caret:

commentAnnot.SetBorderStyle(new Annot.BorderStyle(Annot.BorderStyle.Style.e_dashed, 1));
commentAnnot.RefreshAppearance();

}

I tested SetBorderStyle() and it seems to work on all annotation types.

Having said this it seems that your requirements changed (it seems that after all you don’t want to add the border to the annot itself). In this case you need to draw a rectangle on top of PDFViewCtrl. You can use PDFViewCtrl.ConvPagePtToScreenPt() to convert page coordinates into screen/client cords.

The details vary from platform to platform.