/
Unable to export to PDF (fix)

Unable to export to PDF (fix)

When exporting a crystal report in cableBuilder, you may get an error:

It may also appear in the logs as:

image-20240402-120149.png

This can be caused by one of three issues:

  1. The fonts used in the report not being included in the JDK.

  2. A Windows update, specifically KB3102429, which reverts the fonts back to an out-dated version

  3. Design Alternatives are not enabled, and the exporter expects a design alt value.

 

Fix #1: Fonts used in the report not included in the JDK

To fix this, follow these steps:

  1. Create a fonts folder -> %JAVA_HOME%/lib/fonts

  2. Copy fonts from 'C:\\Windows\Fonts' into %JAVA_HOME%/lib/fonts.

I think the problem is that newer JDK versions are not shipped with a lib/fonts folder which the Crystal Report engine expects.

 

Fix #2: A windows update reverting the fonts to an out-dated version

See the following image:

In my case, following fix #1 resolved the issue.

 

Fix #3: Design Alternatives are not enabled, and the exporter expects a design alt value

image-20241212-151745.png
image-20241212-151817.png

The fix is to edit the crystalReportsExporter.jsp file and update the code where it tries getting designAlternative, and change it to version. Restart the tomcat service and try again, it should now work.

Related content