Forums

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for .NET (v8.x)  /  Rectangle Rounded Corner

Forum Thread - Rectangle Rounded Corner

 Jan 12 2018 5:04 AM
Hello,

I must draw a rectangle with rounded, these round are specified in mm from the corner.

Example:
rectange (x = 10, y = 20, width = 30, height = 40)
then 5mmn back in x and 8 back in y. which will make ellipse-shaped rounds.

What is the simplest method?

I use the class "path" with class "CurveSubPath" but impossible to obetenir what I wish.
would you have an example?

thank you

Bonjour,

Je doit dessinée un rectangle avec des arrondis, ces arrondit sont specifier en mm à partir du coin.

Exemple:
rectange (x=10,y=20,width=30,height=40)
puis a 5mmn en retrait en x et 8 en retrait en y. ce qui fera des arrondit en forme d'ellipse.

Quelle est la methode la plus simple ?

j'utilise la class "path" avec des class "CurveSubPath" mais impossible d'obetenir ce que je souhaite.
auriez vous un exemple ?

merci
 Jan 12 2018 11:45 AM
Posted by a ceTe Software moderator
Hello,

You can add the rectangle with rounded corners using DynamicPDF for .NET product. You will need to add the Rectangle object to the PDF page by setting the CornerRadius property. Below is the code sample.

            Document document = new Document();
            Page page = new Page();
            document.Pages.Add(page);
            Rectangle rectObj = new Rectangle(100, 100, 100, 50);
            rectObj.CornerRadius = 10;
            page.Elements.Add(rectObj);
            document.Draw(@"C:\Temp\MyDocument.pdf");

If the above suggestion do not meet your requirements then please send over a sample image or PDF (including the symbol you would like to add to the PDF) to support@cete.com so we can look into it further.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 6:00 PM.