At the top of my document I have three Font's defined like this:
Code:
private Font headerFont = new Font("Arial", 13);
private Font titleFont = new Font("Clarendon", 20);
private Font normalFont = new Font("Arial", 10);
Then, at the beginning of a function I set their colors like this:
Code:
normalFont.Color = Colors.Black;
normalFont.Bold = false;
titleFont.Color = Color.Parse("0x43545E");
titleFont.Bold = true;
headerFont.Color = Color.Parse("0x43545E");
headerFont.Bold = true;
During the creation of my document, I do many calls like this (txtFr is a textframe):
Code:
var p = txtFr.AddParagraph("Header");
p.Format.Font = headerFont.Clone();
p = txtFr.AddParagraph("Content");
p.AddLineBreak();
p.AddLineBreak();
p.Format.Font = normalFont.Clone();
p = txtFr.AddParagraph("Another Title");
p.Format.Font = titleFont.Clone();
Anything that I set to normalFont seems to be working just fine.
The first time I use headerFont it works fine. Second (third, fourth, etc) time I use headerfont, the text is output correctly, but seems to be set to white (on a white background). Am I missing something here?
Cheers