draw dotted line / rectangle

I can draw a plain line using

graphics.DrawLine(new PdfPen(brush, 0.5f), new PointF(0, 10), new PointF(graphics.ClientSize.Width, 10));

or any shape like this

I want to draw dotted line.

is it possible? if yes then how to do it?

Amit


3 Replies

IJ Irfana Jaffer Sadhik Syncfusion Team May 30, 2022 01:59 PM UTC

Hi Amit,


We have created a sample to draw the line and rectangle in the dot pattern with the output document for your reference. Please try this in your end and let us know if it satisfies your requirement.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/CreatePDFSample-1266941788

Document: https://www.syncfusion.com/downloads/support/directtrac/general/pd/Output_Dot1462972512


Please follow the below links for more information,

https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Graphics.PdfDashStyle.html


Please let us know if you need any further assistance in this.


Regards,

Irfana J.



AS Amit Saraf replied to Irfana Jaffer Sadhik May 31, 2022 12:31 PM UTC

Thanks a lot

This helps me solve my problem

Amit



GK Gowthamraj Kumar Syncfusion Team June 1, 2022 06:41 AM UTC

Hi Amit,


Thank you for your update. We are glad to know that the reported issue is resolved.


Please let us know if you need any further assistance in this.


Regards,

Gowthamraj K


Loader.
Up arrow icon