I've searched pretty exhaustively but have not been able to resolve this issue. I am generating a PDF programmatically in C# and using HtmlArea page elements. The html I'm working with is very basic but for all of my unordered / ordered list, the bullets are twice as large as they should be and are not vertically centered with the text. I'm using a Google Font (but I've tried with system fonts also), and I'm wrapping my html snippet in a <div> element. I have also adjusted the line height of the <li> elements to 2 since I require more space between line items. I've tried targeting the bullet with CSS pseudo elements but it has no effect. How can I manipulate the size and alignment of the bullets/numbers?
Here's a sample of my C# methods that are manipulating the markup:
html (the text string passed in to my C# method):
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
C# code and methods:
HtmlArea htmlArea = new HtmlArea(WrapWithHtmlStyle(data), 20, currentY, pageDimensions.Body.Width - 40, 0);
htmlArea.FontSelecting += HtmlArea_FontSelecting;
private static string WrapWithHtmlStyle(string text)
{
return $"<div style=\"font-color: #242424; font-size: 16px; font-weight: 300; line-height: 2;\">{text}</div>";
}
private void HtmlArea_FontSelecting(object sender, FontSelectingEventArgs e)
{
e.Font = defaultFontThin;
}
Thanks for your help!