public static void AddLabel(TableRow quartersRow1, string Label, alignment.HorizontalAlignment LabelAlignment = alignment.HorizontalAlignment.Right, double Labelpreferwidth = 0, int labelColSpan = 1, double LabelFontSize = 10, bool ShowBorder = false) { TableCell Labelcell = quartersRow1.Cells.AddTableCell(); Labelcell.PreferredWidth = Labelpreferwidth; Labelcell.ColumnSpan = labelColSpan; if (ShowBorder) Labelcell.Borders = new TableCellBorders(border, border, border, border); Block Lblock = Labelcell.Blocks.AddBlock(); Lblock.HorizontalAlignment = LabelAlignment; Lblock.TextProperties.FontSize = LabelFontSize; Lblock.InsertText(genericfontfamily, FontStyles.Normal, FontWeights.Bold, Label ?? ""); }
We have recently migrated our application from .Net framework to .Net Core. Earlier the label we used to print in the PDF were bold, but now since we have migrated the application the bold font is showing as normal font.
The code mentioned above was giving the bold fonts for the labels in the PDF.
Can you please let me know what changes would be needed here for the desired output.