我有一个 PDF,其中使用了 TrueType 字体OCRB
,但未嵌入该字体。
所以我尝试在我的系统上安装字体(顺便说一下是 SLES11 SP2),我做了以下事情:
/user/home/username/.fonts
文件夹中/usr/share/fonts
SuSEconfig --module fonts
fc-cache
当我尝试使用以下命令打印 .pdf 时:
lpr -PHL2400Ce -# 1 test.pdf
Run Code Online (Sandbox Code Playgroud)
.pdf 打印得很好,但OCRB
字体不见了,取而代之的是标准字体。
但是,当我使用evince
(gnome 文档查看器)打开 .pdf 时,我看到查看器中的OCRB
字体(正确),当我打印它(使用同一台打印机)时,它在那里并且绝对正确。
我不明白这一点,因为我猜evince
也lpr
以某种方式使用?任何想法我能做什么?(对我来说能够通过命令行打印 .pdf 非常重要,因为它将成为在后台运行的批处理作业的一部分)
我也尝试了一些这样的方法:
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=output2.pdf -f test.pdf
Run Code Online (Sandbox Code Playgroud)
这给我带来了输出:
....
Can't find (or can't open) font file Arial-BoldMT.
Didn't find this font …
Run Code Online (Sandbox Code Playgroud)