Posted 30 October 2023, 10:26 pm EST - Updated 30 October 2023, 10:32 pm EST
On a small amount of clients, I’m getting the following error when exporting a report generated with AR:
Cannot read the file for font: Roboto
Of course, the report uses the font Roboto. The font is available, installed on the client’s machine.
If instead of exporting the PDF I try to print it on a PDF printer, I’m getting the text all messed up:
In the Active Reports viewer, the text is rendered correctly, although I’m not sure if it’s actually substituting the Roboto font with a similar one.
The stack trace of the exception is as follow:
Exception: System.InvalidOperationException
Message: Cannot read the file for font: Roboto
Stack trace: in #lSr.#TGn.#VGn(IntPtr hdc, Font font, IntPtr& newFont)
in #mqc.#zqc.#Fk(Font font)
in #mqc.#zqc..ctor(Font font)
in #lSr.#SOn.#tMn()
in #lSr.#iRn.#tMn()
in #mqc.#Vqc.#U.#Yqc.#H5k(String fontName)
in #mqc.#Vqc.#U.#Yqc.#Dvd(String fontName)
in #mqc.#Vqc.#U.#Yqc.#RZc(String fontName, FontStyle fontStyle, Boolean isVertical)
in #mqc.#Vqc.#RZc(Int32 fontIndex, String fontName, FontStyle fontStyle, Single sizeInPoints, Boolean vertical)
in GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.#7pk(SectionDocument document, Stream stream, String pageRange, Byte[]& xmpMetadata)
in GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, Stream stream, String pageRange)
in GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, String filePath, String pageRange)