confluence 附件docx文件 乱码处理
服务器安装字体库
Fontconfig是一个用于配置和自定义字体访问的库
yum -y install fontconfig
拷贝需要的字体文件 fonts.zip(或自己电脑中的字体文件c:/Windows/Fonts/* 注:不要拷贝其中的链接文件)到/usr/share/fonts/typeface下
字体包内容:

cd /usr/share/fonts/
mkdir typeface
unzip fonts.zip -d /usr/share/fonts/typeface
mv /usr/share/fonts/typeface/fonts/* /usr/share/fonts/typeface
chmod -R 755 /usr/share/fonts/typeface
安装ttmkfdir来搜索目录中所有的字体信息,并汇总生成fonts.scale文件
yum -y install ttmkfdir
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
将字体的路径加到配置里
vim /etc/fonts/fonts.conf
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
<dir>/usr/share/fonts/typeface</dir> <!-- 新加此行 -->
<dir prefix="xdg">fonts</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
刷新字体缓存
fc-cache
乱码处理
在confluence的安装目录, 如/data/atlassian/confluence/bin下找到setenv.sh, 找到CATALINA_OPTS, 加入一行
CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/typeface/ ${CATALINA_OPTS}"
清空confluence的home下viewfile目录和shared-home/dcl-document目录里的所有缓存文档文件, 不清空的话, confluence预览旧文件时还是会显示方框,只有新文件才会正常.
rm -rf /data/atlassian/application-data/confluence/viewfile/*
rm -rf /data/atlassian/application-data/confluence/shared-home/dcl-document/*
重启confluence
/etc/init.d/confluence restart
confluence UI 界面导入字体
此字体(黑体 常规)可以在windows c/Windows/Fonts 下搜索到

命令汇总
cd /etc/yum.repos.d/
rm -rf CentOS-Base.repo epel.repo Centos-7.repo epel-7.repo
wget http://mirrors.aliyun.com/repo/Centos-7.repo
wget http://mirrors.aliyun.com/repo/epel-7.repo
yum -y install fontconfig
cd /usr/share/fonts/
mkdir typeface
wget xxxx/confluence/fonts.tar.gz
tar -xvf fonts.tar.gz -C typeface
rm -rf fonts.tar.gz
mv typeface/tmp/* typeface/
rm -rf typeface/tmp/
chmod -R 755 /usr/share/fonts/typeface
yum -y install ttmkfdir
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
vim /etc/fonts/fonts.conf
<dir>/usr/share/fonts/typeface</dir>
fc-cache
vim /data/atlassian/confluence/bin/setenv.sh
CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/typeface/ ${CATALINA_OPTS}"
rm -rf /data/atlassian/application-data/confluence/viewfile/*
rm -rf /data/atlassian/application-data/confluence/shared-home/dcl-document/*
/etc/init.d/confluence restart
confluence UI界面安装黑体
confluence 附件docx文件 乱码处理的更多相关文章
- POI读写Word docx文件
使用POI读写word docx文件 目录 1 读docx文件 1.1 通过XWPFWordExtractor读 1.2 通过XWPFDocument读 2 写docx ...
- java使用poi读取doc和docx文件
这几天在学习java io流的东西,有一个网友看到博客后问了一个问题,就是说他的doc文档为什么用我所说的方法死活就是乱码. 我一开始以为是他方法问题,结果自己试了之后发现和他的结果一样也是乱码. 于 ...
- 解决 python 读取文件乱码问题(UnicodeDecodeError)
解决 python 读取文件乱码问题(UnicodeDecodeError) 确定你的文件的编码,下面的代码将以'utf-8'为例,否则会忽略编码错误导致输出乱码 解决方案一 with open(r' ...
- 下载的附件名总乱码?你该去读一下 RFC 文档了!
纸上得来终觉浅,绝知此事要躬行 Web 开发过程中,相信大家都遇到过附件下载的场景,其中,各浏览器下载后的文件名中文乱码问题或许一度让你苦恼不已. 网上搜索一下,大部分都是通过Request Head ...
- libreoffice转换文件为pdf文件乱码问题解决办法
最近系统需要一个office文件预览功能 解决方案为使用libreoffice将office文件转换为pdf文件,然后使用swftools将pdf文件转换为swf文件 最后在前台使用flexpaper ...
- 【Java EE 学习 35 上】【strus2】【类型转换器】【struts2和Servlet API解耦】【国际化问题】【资源文件乱码问题已经解决】
一.类型转换器 1.在动作类action中,声明和表单中name属性的值同名的属性,提供get和set方法,struts2就可以通过反射机制,从页面中获取对应的内容 package com.kdyzm ...
- FAQ&ubuntu12.04 gedit 打开 txt 文件乱码
ubuntu12.04 gedit 打开 windows 分区中的 txt 文件乱码,是因为 ubuntu 和 windows 两个系统的编码不同.解决办法:终端里依次输入以下2 条命令即可: 代码: ...
- ubuntu打开 txt 文件乱码
ubuntu12.04 gedit 打开 windows 分区中的 txt 文件乱码,是因为 ubuntu 和 windows 两个系统的编码不同.解决办法:终端里依次输入以下2 条命令即可: 代码: ...
- [转]ubuntu zip 文件乱码解决 压缩乱码
ubuntu zip 文件乱码解决 压缩乱码 1.1 通过unzip行命令解压,指定字符集 unzip -O CP936 xxx.zip (用GBK, GB18030也可以) 有趣的是unzip的ma ...
随机推荐
- java执行bat代码
java执行bat代码.txt public static void runbat(String path,String filename) { String cmd = "cmd /c s ...
- Js中toFixed()方法保留小数不精准的问题
toFixed() 方法可把 Number 四舍五入为指定小数位数的数字. 问题:部分特殊数值使用toFixed() 方法会出现转换不正确的情况,举个例子: (3329.225).toFixed(2) ...
- centos配置mutt和msmtp发送邮件
一.安装mutt yum install mutt -y 二.配置mutt vim /etc/Muttrc 在里面找到下面几行,并将内容修改为你自己的内容(下面几行分布在不同位置,请耐心查找,记得去掉 ...
- LOJ题解#136. 最小瓶颈路 DFS+Kruskal
题目链接: https://loj.ac/problem/136 思路: 在我的这篇博客中已经讲到什么是最短瓶颈路,同时给出了一个用Kruskal求最短瓶颈路的一个简洁易懂的方法,然而这道题目可以看作 ...
- O005、远程管理 KVM 虚机
参考https://www.cnblogs.com/CloudMan6/p/5256018.html 上一节我们通过 virt-manager 在本地主机上创建并管理 KVM 虚机,其实 virt ...
- 07-django项目连接远程mysql数据库
比如电脑a(ip地址为192.168.0.aaa)想要连接访问电脑b(ip地址为192.168.0.bbb)的数据库: 对电脑a(ip地址为192.168.0.aaa): 在项目settings.py ...
- spring基于注解的IoC以及IoC的案例
1.Spring中IoC的常用注解 1.1明确: (1)基于注解的配置和xml的配置要实现的功能都是一样的,都是要降低程序之间的耦合,只是配置的形式不一样 2.案例:使用xml方式和注解方式实现单表的 ...
- javaScript中 数组的新方法(reduce)
定义和用法 reduce() 方法接收一个函数作为累加器,数组中的每个值(从左到右)开始缩减,最终计算为一个值. reduce() 可以作为一个高阶函数,用于函数的 compose. 注意: redu ...
- Clang教程之实现源源变化
clang教程之实现源源变化 声明:本教程来自于Eli Bendersky's website 原文地址:http://eli.thegreenplace.net/2014/05/01/modern- ...
- 90. Subsets II (Java)
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the ...