iTextsharp HTML/CSS to pdf conversion. border-radius property not working

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

iTextsharp HTML/CSS to pdf conversion. border-radius property not working

Sarfaraj

I have a requirement where I need to draw a circle with CSS. (Since the color of a circle is dynamic, so cannot use an image). Here is the code I am trying to get circle please help me if any workaround is there.

<div style="height: 10px;width: 10px;background-color: #bbb;border-radius: 50%;"></div>
c# code:

using (var htmlMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(html)))
                {
                    using (var cssMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(cssText)))
                    {
                        var a = XMLWorkerHelper.ParseToElementList(html, cssText);
                        XMLWorkerHelper.GetInstance().ParseXHtml(writer, document, htmlMemoryStream, cssMemoryStream, Encoding.UTF8, FontFactory.FontImp, path);
                    }
                }