PDFs in other languages render pound signs
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
The special/internationalized characters are translated to "#" in the PDF file produced.
The atlassian-confluence.log
contains the following error:
com.atlassian.confluence.importexport.ImportExportException: Error while generating PDF!
at com.atlassian.confluence.importexport.impl.PdfExporter.generatePDF(PdfExporter.java:165)
caused by: java.lang.NullPointerException
at org.apache.fop.render.pdf.fonts.LazyFont.getAscender(LazyFont.java:127)
Cause
Before Confluence 4.0, the PDF export only supports the default Verdana font that is installed with Confluence. Additionally, the updated and valid Verdana fonts that are installed may not have been added to the <confluence-home-directory>/fonts
directory.
As of Confluence 4.0, Confluence also provides Times New Roman, Helvetica or Courier fonts for use in PDF exports.
Resolution
- Ensure that the valid Verdana font is installed
- When installing fonts via the Admin console, make sure that a compatible fop.xml file is created in the <confluence-home-directory>/fonts directory. See CONF-7704 for further information.
- To incorporate other fonts (as of Confluence 4.0), you can declare them using a @font-face CSS rule in your PDF Stylesheet.