我遇到了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