Question:
When generating a report, the following error is displayed: Error212: Couldn’t export PDF using font “Arial” because characters referencing this font could not be represented with the character encoding “WinAnsiEncoding”. How can I fix it?
Solution:
This happens because the font being used (Arial) does not support a certain character (such as Greek characters, for example) in the encoding being used by the PDF (WinAnsiEncoding). The error message suggests changing two PDF export properties (AcrobatVersion and SemiDelimitedNeverEmbedFonts).
To fix this, just use GetExportFilter method before exporting the report.
Example:
set reportFilter = report.GetExportFilter("PDF")
reportFilter.AcrobatVersion = 2
reportFilter.SemiDelimitedNeverEmbedFonts = ""
report.Export reportFilter, "C:\Report.pdf"