Installing fonts in the PDF Export Language Support page returns with error of 'No font file could be found with the name'

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Platform Notice: Server and Data Center Only. This article only applies to Atlassian products on the server and data center platforms.

Problem

According to the documentation Create a PDF in Another Language , Confluence administrators need to install font that supports non-latin characters before being able to export pages that contains non-latin characters to PDF successfully.

However, using the guide in the documentation above, installing fonts in the PDF Export Language Support page returns with error of 'No font file could be found with the name <font name>.ttf'

Screenshot 1: installing arial.ttf or verdana.ttf resulted with the above error

 

The following error message can be seen from atlassian-confluence.log as well:

error message in atlassian-confluence.log
2016-09-13 14:50:12,603 ERROR [http-nio-8090-exec-3] [extra.flyingpdf.config.ConfigurePDFLanguageSupportAction] execute Unable to install language font.
 -- referer: http://myconfluence:8090/admin/flyingpdf/configurepdflanguagesupport.action | url: /admin/flyingpdf/doconfigurepdflanguagesupport.action | traceId: 8ec52da9b85d21c6 | userName: admin | action: doconfigurepdflanguagesupport
java.io.IOException: No font file could be found with the name Arial.ttf
	at com.atlassian.confluence.extra.flyingpdf.config.FontsDirectoryFontDao.getFont(FontsDirectoryFontDao.java:25)
	at com.atlassian.confluence.extra.flyingpdf.config.FontsDirectoryFontDao.removeFont(FontsDirectoryFontDao.java:55)
	at com.atlassian.confluence.extra.flyingpdf.config.PdfExportFontManager.installFont(PdfExportFontManager.java:84)
    ...

Cause

From the logs, it seems like there's some issue with removing the old font.

Resolution

Resolution 1: Rename the font being installed to match those in the error message

For example: we're seeing the example error message from Screenshot 1, and at the same time trying to upload and install arial font with the file name "arial.ttf". Rename this file into "Arial.ttf" before re-uploading to Confluence.

Resolution 2: Reset the PDF font settings to its default setting manually

Should that does not fix the issue, delete the old font file from both database and filesystem manually before reinstalling the desired font.

  1. Shutdown Confluence
  2. Run the following SQL query:

    UPDATE bandana SET bandanavalue = 
    '<map>
    	<entry>
    		<string>customfont</string>
    		<string></string>
    	</entry>
    </map>'
    WHERE bandanakey = 'com.atlassian.confluence.extra.flyingpdf.fontname';
  3. Delete anything in the <confluence_home>/fonts folder
  4. Restart Confluence
  5. Upload and install the font again

 

Last modified on Oct 13, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.