请教了^_^如何让pdflatex、dvipdfm做的pdf能复制中文?
时间:2004-04-18
来源:互联网
我的系统是Slackware9.1^_^
作者: hupeng923 发布时间: 2004-04-18
作者: windrose 发布时间: 2004-04-19
http://61.153.200.30/lucida/linux-patch/#xpdf
我还是安装了dvipdfmx,直接使用truetype字体,可以在xpdf里复制中文,(可以粘贴到gnome终端上,但是不能粘贴到gedit上),就是字体太淡了,好象用truetype字体都这样。
作者: hupeng923 发布时间: 2004-04-19

作者: hanzixing 发布时间: 2004-08-03
大家看看openoffice做的pdf效果怎么样?
作者: hupeng923 发布时间: 2004-08-03
作者: hanzixing 发布时间: 2004-08-03
最初由 hanzixing 发表 能说一下详细的过程吗,我的SLACK下然XPDF始终没搞定。 |
作者: hupeng923 发布时间: 2004-08-03
最初由 hanzixing 发表 能说一下详细的过程吗,我的SLACK下然XPDF始终没搞定。 |
注意了:编译xpdf前最好不装firefly的patch,补丁后的freetype会影响xpdf的编译效果;而且./configure时会找不到freetype(xpdf的问题,没引用ft2build.h)当然,编译完成后你可以再安装firefly的补丁
建议的freetype版本是1.4,slackware10的freetype是1.7版的,可能会遇到错误,那就试试xpdf-3.00。
1.编译过程
1.1
先下载xpdf-2.03源代码和lucida的patch。(如果你不是完全安装的slackware,可能会缺少t1lib,需另外安装;如果是xpdf-3.00,需要再打一个patch,到lucida主页下载,另外xpdf-3不支持核心字体):
http://public.planetmirror.com/pub/x...df-2.03.tar.gz
http://61.153.200.30/lucida/linux-pa...f-cjk-fix.diff
1.2
cd xpdf-2.03
patch -p0 -i ../xpdf-cjk-fix.diff
//如果是xpdf3.00,你还得再打这个patch
http://61.153.200.30/lucida/linux-pa...-cjk-font.diff
./configure --prefix=/usr --with-freetype2-includes=/usr/include/freetype2 --with-Xm-includes=/usr/X11R6/include
make
make install
2.然后就是配置了。
2.1
配置的第一步是正确安装中文字体,把simsun.ttc安装到X核心字体系统中。
2.1.1
要把simsun字体路径加入到xorg.conf或XF86Config中,
2.1.2
要运行ttmkfdir为simsun.ttc生成fonts.conf和fonts.dir(二者内容完全一样,注意不要用mkfontscale,对中文字体支持不好)
下面的fonts.dir或fonts.scale是假设某字体目录下只有simsun.ttc一个字体:
16
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-ascii-0
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-gb2312.1980-0
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-gbk-0
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-ibm-cp850
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-iso10646-1
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-iso8859-1
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-iso8859-15
:1:simsun.ttc -misc-NSimSun-medium-r-normal--0-0-0-0-m-0-koi8-r
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-ascii-0
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-gbk-0
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-ibm-cp850
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso10646-1
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso8859-1
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-iso8859-15
simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-c-0-koi8-r
2.2
到xpdf官方主页下载中文语言包
ftp://ftp.foolabs.com/pub/xpdf/xpdf-...plified.tar.gz
2.2.1
把中文语言包解压缩到/usr/share/下面。
2.3
修改/usr/etc/xpdfrc,改成这样:
#----- begin Chinese Simplified support package (2002-jun-17)
cidToUnicode Adobe-GB1 /usr/share/xpdf-chinese-simplified/Adobe-GB1.cidToUnicode
unicodeMap ISO-2022-CN /usr/share/xpdf-chinese-simplified/ISO-2022-CN.unicodeMap
unicodeMap EUC-CN /usr/share/xpdf-chinese-simplified/EUC-CN.unicodeMap
unicodeMap GBK /usr/share/xpdf-chinese-simplified/GBK.unicodeMap
cMapDir Adobe-GB1 /usr/share/xpdf-chinese-simplified/CMap
toUnicodeDir /usr/share/xpdf-chinese-simplified/CMap
displayCIDFontX Adobe-GB1 "-*-simsun-medium-r-normal-*-%s-*-*-*-*-*-gbk-0" GBK
//如果xpdf版本是3.00,则注释掉上面一行,再反注释下面这行。当然,你得把simhei.ttf复制到/usr/share/fonts/ttf/下
#displayCIDFontTT Adobe-GB1 /usr/share/fonts/ttf/simhei.ttf
textEncoding GBK
# Set the default PostScript file or command.
urlCommand "sensible-browser '%s'"
#----- PostScript output control
# Set the default PostScript file or command.
psFile "|lpr"
2.4
最后在/etc/X11/app-defaults/下面增加一个文件Xpdf(注意大写):
Xpdf*fontList:-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1;-misc-simsun-medium-r-normal--12-*-*-*-*-*-gbk-0:
现在就可以了,操作正确的话,这个xpdf可以看到中文书签、能复制中文、可以查找中文。
作者: hupeng923 发布时间: 2004-08-03
我一会就去试试。
作者: hanzixing 发布时间: 2004-08-04
作者: hanzixing 发布时间: 2004-08-04
后提示:
configure: error: argument must be a directory
作者: hanzixing 发布时间: 2004-08-04
./configure --prefix=/usr --with-freetype2-includes=/usr/include/freetype2 --with-X-includes=/usr/X11R6/include
作者: windrose 发布时间: 2004-08-04
最初由 windrose 发表 应该是笔误,改成: ./configure --prefix=/usr --with-freetype2-includes=/usr/include/freetype2 --with-X-includes=/usr/X11R6/include |
--with-freetype2-includes=/usr/include/freetype2 --with-Xm-includes=/usr/X11R6/include
我马上改过来

作者: hupeng923 发布时间: 2004-08-04
为什这样呢
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./../goo -I. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -c Error.cc
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./../goo -I. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -c FTFont.cc
FTFont.cc:23:40: freetype/internal/cfftypes.h: 没有那个文件和目录
FTFont.cc: In member function `FT_UInt FTFont::getGlyphIndex(unsigned int,
unsigned int)':
FTFont.cc:684: error: `CFF_Font' undeclared (first use this function)
FTFont.cc:684: error: (Each undeclared identifier is reported only once for
each function it appears in.)
FTFont.cc:684: error: parse error before `=' token
FTFont.cc:687: error: `cff' undeclared (first use this function)
make[1]: *** [FTFont.o] 错误1
make[1]: Leaving directory `/root/xpdf-2.03/xpdf'
make: *** [all] 错误2
作者: hanzixing 发布时间: 2004-08-04
为什这样呢
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./../goo -I. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -c Error.cc
g++ -g -O2 -DHAVE_CONFIG_H -I.. -I./../goo -I. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -c FTFont.cc
FTFont.cc:23:40: freetype/internal/cfftypes.h: 没有那个文件和目录
FTFont.cc: In member function `FT_UInt FTFont::getGlyphIndex(unsigned int,
unsigned int)':
FTFont.cc:684: error: `CFF_Font' undeclared (first use this function)
FTFont.cc:684: error: (Each undeclared identifier is reported only once for
each function it appears in.)
FTFont.cc:684: error: parse error before `=' token
FTFont.cc:687: error: `cff' undeclared (first use this function)
make[1]: *** [FTFont.o] 错误1
make[1]: Leaving directory `/root/xpdf-2.03/xpdf'
make: *** [all] 错误2
作者: hanzixing 发布时间: 2004-08-04
作者: hupeng923 发布时间: 2004-08-04
:(
作者: hanzixing 发布时间: 2004-08-04
作者: hupeng923 发布时间: 2004-08-04
再次修改原帖
作者: hupeng923 发布时间: 2004-08-04
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28