Linux下pdf读取乱码
生活随笔
收集整理的這篇文章主要介紹了
Linux下pdf读取乱码
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
最近在CentOS6.4下使用其默認(rèn)的文檔查看器打開PDF文檔時出現(xiàn)亂碼的方塊,有兩種方法可以解決。
<?xml?version="1.0"?>?? <!DOCTYPE?fontconfig?SYSTEM?"fonts.dtd">?? <fontconfig>?? <!--? ??If?the?font?still?has?no?generic?name,?add?sans-serif? ?-->?? ????<match?target="pattern">?? ????????<test?qual="all"?name="family"?compare="not_eq">?? ????????????<string>sans-serif</string>?? ????????</test>?? ????????<test?qual="all"?name="family"?compare="not_eq">?? ????????????<string>serif</string>?? ????????</test>?? ????????<test?qual="all"?name="family"?compare="not_eq">?? ????????????<string>monospace</string>?? ????????</test>?? ????????<edit?name="family"?mode="append_last">?? ????????????<string><span?style="color:#ff0000;">文泉驛正黑</span></string>?? ????????</edit>?? ????</match>?? </fontconfig>??
將上面的edit標(biāo)簽對中的子標(biāo)簽中的string值改成文泉驛正黑,再次使用其默認(rèn)的文檔查看器打開PDF文檔沒有出現(xiàn)亂碼。
(上一步將AdobeReader_chs-8.1.7-1.i486.rpm二進制軟件安裝包下載至/tmp目錄下,這個可以隨意。)
2、接著使用rpm工具安裝剛下載的AdobeReader_chs-8.1.7-1.i486.rpm,使用rpm -ivh 軟件包名的命令安裝,如下:
[root@localhost tmp]# rpm -ivh AdobeReader_chs-8.1.7-1.i486.rpm
Preparing...??????????????? ########################################### [100%]
?? 1:AdobeReader_chs??????? ########################################### [100%]
?? 方法一:修改/etc/fonts/conf.d/49-sansserif.conf文件,如下:
[html] view plaincopy方法二、安裝AdobeReader_chs-8.1.7-1.i486.rpm 軟件包
1、去網(wǎng)站http://ardownload.adobe.com/pub/adobe/reader/unix/8.x/8.1.7/chs/下載AdobeReader_chs-8.1.7-1.i486.rpm包,或者直接使用Ctrl_Alt+T打開終端,在終端中輸入命令,如下:
[root@localhost tmp]# wget http://ardownload.adobe.com/pub/adobe/reader/unix/8.x/8.1.7/chs/AdobeReader_chs-8.1.7-1.i486.rpm(上一步將AdobeReader_chs-8.1.7-1.i486.rpm二進制軟件安裝包下載至/tmp目錄下,這個可以隨意。)
2、接著使用rpm工具安裝剛下載的AdobeReader_chs-8.1.7-1.i486.rpm,使用rpm -ivh 軟件包名的命令安裝,如下:
[root@localhost tmp]# rpm -ivh AdobeReader_chs-8.1.7-1.i486.rpm
Preparing...??????????????? ########################################### [100%]
?? 1:AdobeReader_chs??????? ########################################### [100%]
接著就可以使用剛安裝的AdobeReader打開PDF文檔了,個人比較喜歡AdobeReader而不是默認(rèn)安裝的PDF文檔查看器。
總結(jié)
以上是生活随笔為你收集整理的Linux下pdf读取乱码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在linux下使用ZThread
- 下一篇: 图像LBP特征