Ghostscript字体转换问题

时间:2012-03-01 19:39:50

标签: fonts ghostscript embedded-fonts

所有

我在pdf中遇到字体问题。在原文中,它显示一个实线,但如果我复制它,我在剪贴板上得到这个ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

这表明我使用了一些特殊字体,这很好。问题是我使用这个pdf作为ghostscript的输入,并且该行变成了一堆包含X的盒子。 Line in pdf

Boxes in pdf

经过一番搜索,我遇到了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的行?

1 个答案:

答案 0 :(得分:1)

如果没有看到您的PDF文件,就无法说出发生了什么。请注意,Ghostscript转换为PDF后,无法保证复制+粘贴无效,尤其是

由于您已有PDF文件,为什么要将其转换为PDF?

最可能的问题是将Courier替换为Courier-New,但没有看到该文件我无法确定。