Free Support Forum -

BorderStyle enum

Hi. I can create annotation with 2 border style types: Solid and Dashed. But on there are Beveled, Inset and Underline border types. Does Aspose.Pdf support this 3 features (Beveled, Inset, Underline), because I can’t using it.

And does it possible to set the dashed line like on screenshot:
123.png (3.9 KB)


Thank you for contacting support.

Please note that the API references are reflecting the Enumeration values based on Aspose.PDF for .NET 18.7. Kindly ensure using latest version of the API in your environment. Moreover, the documentation article Working with Graphs explains how a rectangle and dashed line can be added on a PDF page.

We hope this will be helpful. Please feel free to contact us if you need any further assistance.

Thanks for answer. Yeah, I’m tested example with graph, works fine, I can set dash characteristic in DashArray. But problem that I don’t know how programmatically make dot-dashed border style by using FreeTextAnnotation class.

FreeTextAnnotation has Border.Dash property. For using this property we create new Dash object. For example:
freeTextAnnotation.Border.Dash = new Dash(2,2);
But Dash constructor has only 2 parameters, so create border dash style like on screenshot is impossible (programmatically): 123.png (26.4 KB)

Also, we can’t using Rect from FreeTextAnnotation (like in example with graphs), because in FreeTextAnnotation we are using Aspose.Pdf.Rectangle instead of Aspose.Pdf.Drawing.Rectangle in examples with graphs.


Thank you for elaborating it further.

We are afraid that only one format of Dashed line is supported at the moment. Which itself is not working fine and an issue with ID PDFNET-45092 has been logged to rectify the problem. Another ticket with ID PDFNET-45093 has been logged as a feature request to support more dashed styles as supported by Adobe Reader, which are displayed in your screenshot as well.

The ticket IDs have been linked with this thread so that you will receive notifications as soon as the tickets are resolved.

We are sorry for the inconvenience.