Export to PDF messes up right align of bold, non-standard font text

Posted by: evalentine on 13 January 2022, 6:11 am EST

    • Post Options:
    • Link

    Posted 13 January 2022, 6:11 am EST - Updated 30 September 2022, 7:29 am EST

    I have a report with a couple of textboxes in the header that are using font AGaramond RegularSC and alignment of Right. One of the textboxes is set with Bold: True. A preview of the report shows the contents of these textboxes right aligned as expected.

    However, when the report is run and exported to PDF, the contents of the bolded textbox is not all the way to the right. If I turn bold off or use a different font, the alignment looks correct. I can’t tell the client that they can’t have bold text in the heading or that they can’t use this font. Please advise.

  • Posted 13 January 2022, 5:00 pm EST

    Hi Evalentine,

    Please try setting the CompatibilityMode of your report to GDI instead of CrossPlatform.

  • Posted 14 January 2022, 6:00 am EST

    Where do I find this property?

  • Posted 16 January 2022, 5:05 pm EST - Updated 30 September 2022, 7:29 am EST

    Hi Evalentine,

    You can find this property in the SectionReport’s Properties window. I have also attached a screenshot for your reference. You also use the following code to set this property:

    SectionReport1 rpt1 = new SectionReport1();
    rpt1.CompatibilityMode = GrapeCity.ActiveReports.Document.CompatibilityModes.GDI;

  • Posted 24 February 2023, 5:01 am EST

    Has there been any resolution to this?

    We’re using AR16, and using this to create a .net core service to do our output (which requires the use of CrossPlatform for implementing RTF controls as html, etc.) When we have the first page of our report use the CrossPlatform compatibility mode, any plain text or label controls on that first page that simply use a bold font will appear in the very top of the page in a garbled format, and all subsequent uses of a bold font throughout our reports will be the same. When the first page of our report does not have the CrossPlatform set (and there are no RTF controls), it renders it (and subsequent uses) correctly. This makes it difficult to ensure that the first document does not have rtf controls so that we can omit the CrossPlatform declaration.

    We are stringing together several reports into one PDF file, so my guess is that the PDFExport is messing up the font declarations for the unified document? Wondering if the FontFallback or NeverEmbedFonts properties could be used to correct this.


  • Posted 26 February 2023, 7:22 pm EST

    Hi Todd,

    >> Has there been any resolution to this?

    Yes, the issue is resolved in the latest version of ActiveReports 16 and ActiveReports 17. Please refer to the attached sample.

    You download latest versions of ActiveReports using the following links:

    I wasn’t able to reproduce this issue at my end could you please share a sample application reproducing this issue. Or edit the attached sample such that it reproduces the issue and send it back to us for further investigation.PDFBoldFontTestv17.zipPDFBoldFontTest.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels