hi there
i am constructing a PDF document for a report.
the very first thing i do is to
pdf = new Pdf();
pdf.DefaultFontName = FontName; //“Arial” in this case
i then go on to build up the report and do things such as
Aspose.Pdf.Table tbl = new Aspose.Pdf.Table();
tbl.ColumnWidths = ColumnWidths;
tbl.DefaultCellPadding = something…;
etc… then
tbl.ImportDataTable(dt, true, 0, 0, dt.Rows.Count, dt.Columns.Count);
foreach (Aspose.Pdf.Row rr in tbl.Rows)
{
if (!odd)
rr.BackgroundColor = lb;
odd = !odd;
and things like this
TextInfo boldCol = new TextInfo();
boldCol.Alignment = AlignmentType.Left;
boldCol.IsTrueTypeFontBold = true;
boldCol.FontSize = 10;
tblHeadings.SetColumnTextInfo(0, boldCol);
however when i do the above whatever element i have styled loses the font set right at the beginning.
surely i dont have to set the font as part of every bit of styling i add to an element?
so the table is all in one font, but as i format the headings to be bold and some are then left aligned … things like that, whenever i do this, those elements revert back to time roman font.
could someone explain how to avoid this pelase
thanks
nat