Garbled text in document preview
Asked by Martin Fluor:

Hi, we've got a weird problem with confluence that i've been unable to find any solutions to:

When uploading (drag and drop) a document (word, powerpoint, etc.) into a confluence page, all text in the document preview (default "Files and images" macro) is replaced by weird symbols:

![22-08-_2018_15-45-48.png](/t5/image/serverpage/image-id/30197i4E00A7E7B68CA245/image-dimensions/564x372?v=v2 "22-08-_2018_15-45-48.png")

This happens regardless of font, the document contains standard latin characters only.

Uploading doc instead of docx results in the same garbled preview. When downloading the attachment and viewing it in word, it gets displayed properly.

When using the "Office Word" macro the text is displayed correctly.

We're using confluence v6.10.1.

Thanks for the help


Answers:
author: Shannon S
body: Martin,

Is this a specific document, or are you saying any document at all that you create using Office shows garbled text?

When did you notice this problem started occurring? Was there a recent update that could have caused it, or did you not start using the feature until now?

Regards,

Shannon

comments: author: Martin Fluor
body: Hi, thanks for the reply.

This happens to every document we upload, regardless of content or who created it.

I cant say exactly when it started happening, but it has been like this for the last few confluence updates we did. I just postponed looking into it as it is not business critical, just annoying. What we did most of the time was just to save the document as pdf and uploading that instead of the original document. This happens in chrome aswell as in firefox.

It gets even more interesting with powerpoint documents:

![22-08-_2018_16-57-37.png](https://community.atlassian.com/t5/image/serverpage/image-id/30218i41AD11DE5869402C/image-dimensions/717x409?v=v2 "22-08-_2018_16-57-37.png")

In the 'small' preview, text is displayed correctly. Once i click it and the 'big' preview opens, it gets mushed up again. This affects every kind of text (in a table, textbox, wordart, etc.) but nothing else.

![22-08-_2018_16-58-10.png](https://community.atlassian.com/t5/image/serverpage/image-id/30219i220B613C392F772B/image-dimensions/566x356?v=v2 "22-08-_2018_16-58-10.png")

Cheers,

Martin


author: Shannon S
body: Thank you, Martin.

Do you happen to be running Confluence on a Linux server?

I found a few issues where the Linux server wasn't using the proper fonts from Windows, thus showing the results you see.

If so, can you try the following:

* [CONFSERVER-54067](https://jira.atlassian.com/browse/CONFSERVER-54067)

You can also review this article:

* [Confluence UI shows garbled or corrupt text on CAPTCHA, macros and/or diagrams due to missing fonts](https://confluence.atlassian.com/confkb/confluence-ui-shows-garbled-or-corrupt-text-on-captcha-macros-and-or-diagrams-due-to-missing-fonts-938027858.html)

Following that, please [clear the plugins cache](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html).

Let me know how it goes!

Regards,

Shannon


author: Martin Fluor
body: Hi Shannon.

Yes, we're running rhel 7.4 like others in the ticket you linked.

I just tried the workarounds there but unfortunately, they did not solve this problem. Document preview still looks the same.

Cheers,

Martin


author: Shannon S
body: Martin,

Thank you for confirming.  

For further investigation I would recommend that you check your encoding is set correctly to UTF8. Secondly, when dealing with PDF issues, we recommend that you dump the dlc directories so that those preview files were regenerated after the fonts had been installed.  
Back up and remove the thumbnail directories  
**\<Confluence-Home\>/viewfile/**   
**\<Confluence-Home\>/shared-home/dcl-thumbnail/**   
**\<Confluence-Home\>/shared-home/dcl-document/**

Lastly, review this article and try the workarounds there. It's very similar to the prior article I sent you but recommends a separate set of fonts to install:

* [The Text in a PowerPoint, Excel or Word Document is Missing or Looks Different when Using the Viewfile Macro](https://confluence.atlassian.com/confkb/the-text-in-a-powerpoint-excel-or-word-document-is-missing-or-looks-different-when-using-the-viewfile-macro-200213562.html)

Regards,

Shannon


author: Martin Fluor
body: Hi Shannon

The article you referenced (installing windows fonts) did the trick. Newly uploaded documents are now previewed correctly. And after deleting the folders you mentioned, all previously uploaded documents are as well.

Thanks for the great support!

Cheers,

Martin


author: Shannon S
body: Perfect! You're welcome, Martin. Happy to help.

Take care, and have a pleasant week.

Regards,

Shannon


Tags: confluence-server

document-management

preview

server