Document preview is not showing characters correctly
Symptoms
Document preview is not showing characters correctly; characters are appearing as squares instead of the correct characters.
Cause
There are missing fonts on the server and in the conversion service - soffice - when converting the document to PDF
Diagnosis
You can locally open the document on your computer with LibreOffice (for example, a .docx file with Chinese characters), but when previewing in OpenKM you get squares instead of the correct characters.
Solution
Install missing fonts on the server and restart the OpenKM service (usually it will not be necessary to restart the OpenKM service when installing new fonts, but sometimes Java does not detect new fonts on the fly and it is necessary to restart the service).
It is also necessary to clean the conversion cache files. Go to Administration > Tools > Clean conversion cache.
In case you do not have this option - Clean conversion cache - take a look at $TOMCAT_HOME/repository/. If you have a folder named "cache", stop OpenKM, remove it, and start the application again.
Installing Microsoft fonts in Ubuntu:
$ apt-get install msttcorefonts
Installing other TrueType fonts:
Create a folder, copy TrueType fonts into it, and refresh the font cache.
$ mkdir /usr/share/fonts/truetype/new
$ cp xxxx.ttf /usr/share/fonts/truetype/new/.
fc-cache -f -v
Installing Microsoft fonts in CentOS:
$ yum install cabextract rpm-build
$ wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
$ rpmbuild -ba msttcorefonts-2.0-1.spec
$ rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm
$ /sbin/service xfs reload
Properties
Properties | |
---|---|
Date |
2016-09-23 |
Applies to |
|
Keywords
- AllVersions