我遇到了pdf中字体的问题。在原文中,它显示了一条实线,但是如果我复制它,我会在剪贴板上获得这个ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
。
这表明它是一些特殊的字体被使用,这会很好。问题是我使用这个pdf作为ghostscript的输入,并且该行变成了一堆带有X的框。
经过一番搜索,我碰到this answer。 -c
命令成功删除了这些框,但该行仍然缺失。
运行在Windows gswin64c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf USA_15238-2897_5853101.pdf
7 64位系统,我得到下面的输出:
GPL Ghostscript 9.04 (2011-08-05)
Copyright (C) 2011 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
Substituting font Courier-Bold for CourierNew,Bold.
Loading NimbusMonL-Bold font from %rom%Resource/Font/NimbusMonL-Bold... 3825552 2503053 2085544
779106 3 done.
Substituting font Courier for CourierNew.
Loading NimbusMonL-Regu font from %rom%Resource/Font/NimbusMonL-Regu... 3986304 2660967 2146096
844377 3 done.
Can't find (or can't open) font file %rom%Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Can't find (or can't open) font file %rom%Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Querying operating system for font files...
Didn't find this font on the system!
Substituting font Helvetica for ArialMT.
Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 4100320 2785188 2226832
918025 3 done.
Page 2
Substituting font Courier-Bold for CourierNew,Bold.
Substituting font Courier for CourierNew.
添加Windows字体文件夹的字体路径开关允许查找字体,但不能解决行盒问题。
运行gswin64c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams" -f USA_15238-2897_5853101.pdf
产生这样的:
GPL Ghostscript 9.04 (2011-08-05)
Copyright (C) 2011 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
Substituting font Courier-Bold for CourierNew,Bold.
Loading NimbusMonL-Bold font from %rom%Resource/Font/NimbusMonL-Bold... 3825552 2503973 2105728
793286 3 done.
Substituting font Courier for CourierNew.
Loading NimbusMonL-Regu font from %rom%Resource/Font/NimbusMonL-Regu... 3986304 2661903 2166280
858469 3 done.
Can't find (or can't open) font file %rom%Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Can't find (or can't open) font file %rom%Resource/Font/ArialMT.
Can't find (or can't open) font file ArialMT.
Querying operating system for font files...
Didn't find this font on the system!
Substituting font Helvetica for ArialMT.
Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 4100320 2786124 2247016
932205 3 done.
Page 2
Substituting font Courier-Bold for CourierNew,Bold.
Substituting font Courier for CourierNew.
但现在该行是在PDF空间。如果我复制并粘贴它,我会得到─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
。
我需要添加哪些ghostscript开关以保持原始PDF格式的行?
我使用Ghostscript来合并这些pdf中的几个。我不在乎复制和粘贴,我关心外观。我刚刚提到了复制,因为它似乎表明正在使用unicode字体生成该行,而不是矢量图形。我无法提供原始pdf,因为它包含敏感数据。 'Courier'和'Courier-New'之间有什么区别? – 2012-03-02 13:28:23
我接受这个答案,因为它是'Courier'字体替换。感谢您指点我正确的方向。 – 2012-03-02 16:45:15
但是ghostscript中的开关是否修复了快递字体替换? – Joe 2013-04-25 13:03:19