Wednesday, May 17, 2023

Crystal Reports font problem in Exported PDF

So, we had this issue, that one of our Web App running on Server was generating a PDF file using Crystal Reports Export API. The Crystal Reports file had barcode fonts to generate barcodes. But the exported PDF was showing the normal Arial font instead of barcodes.

First I investigated that PDF file itself, whether barcode fonts are being embedded in the PDF file or not. So, I realized that instead of barcode fonts, it has Arial font only. So Crystal Reports export system was not embedding the Barcode Fonts during PDF file creation process.

Though we had already installed the fonts on the server, but the font was installed for the user which was logged in at the time of installation. So, I right clicked on the font file and clicked on Install for all Users. This resolved the issue and barcode fonts started to appear in PDF.

Note that this problem can occur for other reasons as well, for example, the fonts are secured and they are not allowed to be embedded. But in my case installing the fonts for all users resolved the problem.