我在尝试使用 Ghostscript 将 pdf 文档转换为 pcl 文档时遇到问题。
原始 pdf 文档是横向的,因此 pcl 也应该是横向的。尽管如此,在使用具有以下命令功能的 Ghostscript 9.14 的 Windows 中:
gswin32 -dNOPAUSE -dBATCH -sDEVICE=ljet4 -dSAFER -dAutoRotatePages=/NONE -sPAPERSIZE=a4 -sOutputFile=./convert_windows.pcl ./duplicate_windows.pdf
Ubuntu Linux 内核版本 3.2.0-40-generic 64 位(但使用 Ghostscript 9.05)中的相同命令会导致大小为 A3 而不是 A4 的错误定向 pcl 文件作为原始文件。
原始的 pdf 文件包含 windows 字体“arial”,它也应该在 linux 中可用。软件包“msttorcefonts”安装在 linux 上。这是 Ghostscript 字体图的简短摘录:
cat /usr/share/ghostscript/9.05/Resource/Init/Fontmap.GS
给出:
% This font, and only this font among the Hershey fonts, uses
% the SymbolEncoding.
/Hershey-Symbol (hrsyr.gsf) ; % 5066567
/Arial /ArialMT ;
/Arial,Bold /Arial-BoldMT ;
/Arial,Italic /Arial-ItalicMT ;
/Arial,BoldItalic /Arial-BoldItalicMT ;
以下清单显示了 linux 命令行的输出,它与 windows Ghostscript 控制台的输出相同!
GPL Ghostscript 9.05 (2012-02-08)
Copyright (C) 2010 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
Loading NimbusMonL-Bold font from /usr/share/fonts/type1/gsfonts/n022004l.pfb... 3627296 2211468 1767360 473754 3 done.
Loading NimbusSanL-Bold font from /usr/share/fonts/type1/gsfonts/n019004l.pfb... 3668288 2319461 1807728 497748 3 done.
Loading NimbusSanL-Regu font from /usr/share/fonts/type1/gsfonts/n019003l.pfb... 3800176 2466391 1827912 512832 3 done.
Loading NimbusMonL-Regu font from /usr/share/fonts/type1/gsfonts/n022003l.pfb... 3964224 2617715 1969200 654805 3 done.
Page 2
我已经尝试了几个 Ghostscript 的选项,比如
-dFIXEDMEDIA
-dNORAGEPAGESIZE
和别的。
将 pdf 文档转换为 ps 时,两种环境的结果相同。
有没有人有这个问题或想法的经验?
预先感谢和亲切的问候