I have a simple test setup in which I add some HTML to a document & then try to format the paragraph after the InsertHTML method is called.
What I am trying to do is have the Writeln method called after InsertHTML have 0 spacing before & after the text. Currently, the Writeln writes the text with “auto” spacing after (ParagraphFormat.SpaceAfter is incorrectly set to Auto instead of “0”, even though it is explicitly called).
Here is the code:
public Document createTestReport()
{
Document doc = new Document();
DocumentBuilder db = new DocumentBuilder(doc);
db.InsertParagraph();
db.ParagraphFormat.SpaceAfter = 0;
db.ParagraphFormat.SpaceBefore = 0;
db.InsertHtml("<p>BlahBlahBlah</p><ul><li>Some List Item</li><li>Another</li></ul>");
db.Font.Bold = true;
db.ParagraphFormat.SpaceAfter = 0;
db.ParagraphFormat.SpaceBefore = 0;
db.Writeln("Some Title");
return doc;
}