We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bold font looks different

Hi,


I do the following:

  • Create a new PDF document using Aspose.Net.
  • I add text with the following properties to the document:
TextInfo kmcHeader = new TextInfo();
    kmcHeader.FontName = “Arial Narrow”;
      kmcHeader.FontSize = 12;
        kmcHeader.Color = new Color(127,127,127);
          kmcHeader.IsTrueTypeFontBold = true;
            Text kmcText = new Text(“Compensation”, kmcHeader);

            My problem is that the bold text created by Aspose.Net looks different than bold text created with Office 2012 and exported to PDF (see attachment). The text from Aspose looks more bolder than the bold versions created with other programs.

            Any suggestions?

            Thanks,

            Andrei

            Hi Andrei,

            Thanks for using our products.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>

            I
            have tested the scenario and have observed that the bold text generated with Aspose.Pdf.Generator namespace is slightly bolder, than the output generated with MS Word. For the
            sake of correction, I have logged it in our issue tracking system as <span style=“font-family:“Arial”,“sans-serif””>PDFNEWNET-33927. We
            will investigate this issue in details and will keep you updated on the status
            of a correction.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””><span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>

            We
            apologize for your inconvenience.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>


            Hi Andrei,


            Thanks for your patience.

            In order to resolve your problem, we recommend you to please try using Aspose.Pdf namespace. Please take a look over the code snippet specified below and the resultant PDF which I have generated with upcoming release version of Aspose.Pdf for .NET 7.7.0.

            [C#]

            string outFile = “c:/pdftest/33927.pdf”;<o:p></o:p>

            Document doc = new Document();

            Page page = doc.Pages.Add();

            TextState kmcHeader = new TextState();

            kmcHeader.Font = FontRepository.FindFont("Arial Narrow");

            kmcHeader.FontSize = 12;

            kmcHeader.ForegroundColor = System.Drawing.Color.FromArgb(127, 127, 127);

            kmcHeader.FontStyle = FontStyles.Bold;

            TextFragment kmcText = new TextFragment("Compensation");

            kmcText.Segments[1].TextState = kmcHeader;

            page.Paragraphs.Add(kmcText);

            doc.Save(outFile);

            The issues you have found earlier (filed as PDFNEWNET-33927) have been fixed in Aspose.Pdf for .NET 7.7.0.


            This message was posted using Notification2Forum from Downloads module by aspose.notifier.