# The text in a PowerPoint, Excel or Word Document is missing or looks different via Confluence View File macro

#### お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

Before following this guide, check if you are using a Java version that is affected by this bug:

If that is the case, proceed with the workaround on the bug before checking for font issues.

## 要約

The View File macros allow you to embed an Office or PDF document on a page. However, after an installation, upgrade, or migration to a different OS, the files are displaying incorrectly or not showing at all.

## 環境

• Confluence Server and Data Center.
• Supported OS.

## 診断

When using the view file macro, the text is missing or appears different than when viewing the document in its native application.

Viewed in MS PowerPointViewed in Confluence

Text, background, and image are all shown.

Background and image are shown, but the text is missing.

This error may also be seen in atlassian-confluence.log

2017-09-21 15:56:37,697 WARN [Caesium-1-2] [apache.fontbox.util.FontManager] findTTFontname Font not found: Arial,BoldItalic

This can also happen with non-English characters, like Chinese, which doesn't display properly or appear as boxes.

## 原因

Custom fonts or Microsoft-specific fonts (for example Arial, Times New Roman, or Courier New) may not exist if you are running Confluence and the Office Connector on a non-Windows server. When previewing, a substitute font will be used to render the text.

Similarly, to display non-English Characters like Chinese, the system will need the required fonts.

## 注意

Make sure that the document is using the correct fonts. For example, the msttcorefonts package does not include Wingdings but one called Webdings. In Windows this will fallback correctly, but not with Confluence. This also occurs for fonts such as Helvetica. Use Arial in the document instead.

## ソリューション

### Linux

1. Confluence をシャットダウンします。
2. Install the missing fonts onto your server on Linux (see below)
3. Set the system property confluence.document.conversion.fontpath in setenv.sh (see Configuring System Properties) to
• /usr/share/fonts/truetype/msttcorefonts for Ubuntu/Debian
• CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/truetype/msttcorefonts ${CATALINA_OPTS}" • /usr/share/fonts/msttcore for Centos/RedHat • CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/msttcore${CATALINA_OPTS}"
4. If you have any custom, non-Microsoft fonts in your document, the font files must be copied to the same path outlined in the previous step.
5. 以下のディレクトリのファイルを削除します。
• <confluence_home>/viewfile/
• <confluence_home>/thumbnails/

•  <confluence_home>/shared-home/dcl-document/

• <confluence_home>/shared-home/dcl-document_hd/

• <confluence_home>/shared-home/dcl-thumbnail/

6. Confluence を再起動します。

#### Installing Microsoft Fonts

• For Debian/Ubuntu (see RestrictedFormats/Microsoft_Fonts)

sudo apt-get install ttf-mscorefonts-installer
• For RedHat/Centos (see Get Microsoft's Core Fonts for the Web and Cleartype Fonts)

yum install curl cabextract xorg-x11-font-utils fontconfig
rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm

If you're running RHEL 7 / EC2 AMI on AWS and the server can't find the package crabextract, you may need to update the epel-release first:

yum install epel-release
yum install ./epel-release-latest-*noarch.rpm
• Webcore package (RedHat/Centos) - this package contains the Wingdings font, as well as other Microsoft fonts. It could be an alternative in case the msttcore package doesn't contain all the fonts you need.

yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm
• If you choose to use the WebCore package, make sure to update the JVM parameter to the following:

• CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/webcore ${CATALINA_OPTS}" #### Installing Non-English Fonts 1. Identify which fonts are being used in the Word Document. For example, in the case of Chinese Fonts, MingLiU is one famous font. 1. It is important that all Chinese characters are using some kind of font, so Confluence can look for relevant files. 2. Download the font and place it under the relevant path. In CentOS/RHEL, it will be as discussed above. 3. Use that font in the system property confluence.document.conversion.fontpath in setenv.sh • CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/MingLiU${CATALINA_OPTS}"

A generic font for Chinese is wqy-zenhei, this can also be used, in case it is unsure that what fonts are being used in the document.
For Korean Text, if the font Batang isn't displaying properly, it can be replaced by Malgun Gothic, a font commonly used in Microsoft PowerPoint/Word
For Japanese Text, a generic font would be IPA Gothic so this font family can be installed to help displaying Japanese Text

For broken bullet points in Power point files have a look at  CONFSERVER-52254 - Getting issue details... STATUS

### Windows

• Copy any missing fonts to %windir%\fonts this is usually c:\windows\fonts.

When copying fonts from a computer running Windows, the font files will typically be located in c:\windows\fonts. You can also download the Microsoft Core fonts from sourceforge.

Please note this is just a workaround that may not cover all cases, here is the bug report for the issue:

CONFSERVER-39441 - 課題詳細を取得中... ステータス

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する