【发布时间】:2012-03-01 19:39:50
【问题描述】:
全部,
我遇到了 pdf 中的字体问题。在原始文件中,它显示一条实线,但如果我复制它,我会在剪贴板上得到这个ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ。
这表明它使用了一些特殊的字体,这很好。问题是我将此pdf用作ghostscript的输入,并且该行变成了一堆带有X的框。
经过一番搜索,我发现了this answer。 -c 命令成功删除了这些框,但该行仍然丢失。
在 Windows 7 64 位系统上运行 gswin64c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf 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 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 保持一致?
【问题讨论】:
标签: fonts ghostscript embedded-fonts