Difference between Fonts


I am generating a PDF. but into a single pdf file, there are two different font style for Heading while I am using the same code for both.

Difference In Font PDF.png (71.4 KB)

Here is my sample code, For all the heading I am using the same method.

        public static Aspose.Pdf.Table SubHeadingTable(Aspose.Pdf.Page VerificationResultssec, string HeadLine, int left, int top)
        Aspose.Pdf.Table Researcherslogtabl = new Aspose.Pdf.Table();
        Researcherslogtabl.IsKeptWithNext = true;
        Researcherslogtabl.ColumnWidths = "480";
        Aspose.Pdf.MarginInfo Researcherslogtablmargin = new Aspose.Pdf.MarginInfo();
        Researcherslogtablmargin.Top = top;
        Researcherslogtablmargin.Left = left;
        Researcherslogtabl.Margin = Researcherslogtablmargin;
        Aspose.Pdf.Row Researcherslogtablrow1 = Researcherslogtabl.Rows.Add();
        Aspose.Pdf.MarginInfo margin = new Aspose.Pdf.MarginInfo();
        margin.Left = 7;
        margin.Right = 4;
        margin.Top = 3;
        margin.Bottom = 3;
        Researcherslogtablrow1.Cells[0].Margin = margin;
        Researcherslogtablrow1.Cells[0].BackgroundColor = Aspose.Pdf.Color.FromRgb((System.Drawing.Color)colorConverter.ConvertFromString("#0F699B"));
        Researcherslogtablrow1.Cells[0].DefaultCellTextState = new TextState() { Font = FontRepository.FindFont("Helvetica"), FontSize = 13, FontStyle = FontStyles.Bold, ForegroundColor = Aspose.Pdf.Color.FromRgb((System.Drawing.Color)colorConverter.ConvertFromString("#ffffff")) };
        return Researcherslogtabl;



Thank you for contacting support.

Would you please share SSCCE code along with source PDF document, if any, so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using Aspose.PDF for .NET 19.7.


Actually i shared a common method which is being used to create a heading, But as you can see in the image one heading has a different font style while rest of heading have different font style.

Why this is happening?



We need to reproduce the problem in our environment for investigations and further assistance, so please share requested data so that we may proceed to help you out.