Search code examples
c#asp.netpdffontscrystal-reports

Why Is the Barcode In My Crystal Report PDF Visible When I View it Locally But Not Visible When Viewed From the Web Server?


I have an ASP.NET 4.5 /C# web application that uses a Crystal Report and displays it on a web page via the Crystal Report Viewer. I also have an export button that allows the report to be exported to a PDF file. The report contains a Code39 barcode font.

When I view my page locally, I can see the report and barcode both onscreen and when I export the report to a PDF file. When I view my report via the web server, the onscreen version works and I can see the barcode. However, when I export the report from the web server, the bar code doesn't display in the PDF file.

The barcode font is installed on the web server, and it looks perfect when I view the report in the browser. I've assigned the font's permissions to all users. The font embeddability is set to "Print and Preview". Does anyone have any idea what I'm missing? Thanks in advance!


Solution

  • After probably spending 2+ days on this, I found the solution, which can only be attributable to Divine intervention. After countless tweaks to the report server, my report, file paths, framework versions, security settings, and registry keys the fix wound up taking all of 5 seconds.

    When installing the Code39 barcode font, I only needed to right click on the icon and select the "Install for All Users" option. Alas that I didn't see this during my first install! Even though I had gone in to the font security settings and given all users permissions, this wasn't enough. It turns out it must be installed for all users.

    Hopefully this helps someone in the future and prevents you from wasting an obscene amount of hours on a barcode font!