What is the difference between DocumentBuilder.Bold and DocumentBuilder.Font.Bold?


#1

What is the difference between DocumentBuilder.Bold and DocumentBuilder.Font.Bold?


#2

@gojanpaolo,

There is no difference. You can use any of these (DocumentBuilder.Bold and DocumentBuilder.Font.Bold) to specify bold formatting:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Bold = true;
builder.Writeln("Bold");

builder.Font.Bold = false;
builder.Writeln("Normal");

builder.Font.Bold = true;
builder.Writeln("Bold again");

builder.Bold = false;
builder.Writeln("Normal again");

doc.Save("E:\\Temp\\19.4.docx");

#3

Got it thanks!