Unable to render multibyte characters in document preview thumbnails after upgrading to Confluence Data Center 6.10.x and beyond

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Summary

Multibyte characters such as Japanese font installation does not render properly in document previews for Confluence Data Center starting from versions that include the Document Conversion Sandbox feature.
When rendering a thumbnail for an Office or PDF file that has multibyte characters installed (Japanese kanji, katanana, hiragana etc) you instead encounter a rendering issue where the text is replaced with Unicode escape characters or placeholder boxes.

Environment

  • This was originally observed on Confluence Data Center 6.13.8 that was being upgraded from a 6.3.x.
  • Using OpenJDK 1.8.0
  • Amazon Linux 2 operating system (similar to RHEL 6)

Diagnosis

Here's an example of expected behavior:

screenshot-3.png

Actual behavior before solution path is applied from the same document

 

Cause

The issue stems from the fact that the system properties setting the default fonts for the Document Conversion service library, Aspose, do not get passed on to the sandbox process directly. Migrating to a version that has Document Conversion sandbox will thus cause thumbnail rendering to display the issues. It was originally discovered in testing for CONFSERVER-57588.

Solution

  • Install the following font libraries using your package manager of choice. In the case of Amazon Linux 2, this would be yum.
    • ipa-gothic-fonts
    • ipa-mincho-fonts
    • vlgothic-fonts
    • vlgothic-p-fonts
    • ipa-pmincho-fonts
    • ipa-pgothic-fonts
  • Add the following JVM arguments in your setenv file as noted from CONFSERVER-57588. This will explicitly declare the font libraries to be passed to the Document Sandbox child process:
CATALINA_OPTS="-Dconversion.sandbox.java.options=-Dconfluence.document.conversion.slides.defaultfontname.regular=IPAGothic,-Dconfluence.document.conversion.slides.defaultfontname.asian=IPAGothic,-Dconfluence.document.conversion.slides.defaultfontname.symbol=IPAGothic,-Dconfluence.document.conversion.words.defaultfontname=IPAGothic ${CATALINA_OPTS}"


Last modified on Jan 17, 2020

Was this helpful?

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