printing - 使用 Ghostscript 将 PCL 转换为 PostScript

标签 printing solaris postscript solaris-10

所以我想使用 Ghostscript 将 PCL 格式创建的文件转换为 PostScript。

这就是我的问题的要点。我只是想在命令行上运行它,但在最后阶段,它必须在 lp 命令上运行,例如
lp -d < gs 某事某事

GPL Ghostscript 9.00 (2010-09-14)
我将在 Solaris 10 服务器上运行它,但我相信任何 Unix 系统都应该类似。

bash-3.00# /usr/local/bin/gs -sDEVICE=pswrite     -dLanguageLevel=1     -dNOPAUSE -dBATCH -dSAFER     -sOutputFile=output.ps cms-form.pcl
GPL Ghostscript  9.00 (2010-09-14)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in &k2G-210z100u0l6d0e63fa0V
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1910   1   3   %oparray_pop   1909   1   3   %oparray_pop   1893   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1154/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Current file position is 30
GPL Ghostscript  9.00: Unrecoverable error, exit code 1

最佳答案

您正在使用 Ghostscript ( gs ),它不能读入和解释 PCL。

您应该使用来自 GhostPDL 解释 PCL 的组件:可执行文件名为 pspcl6 .

然后像这样的命令

 pspcl6 ^
   -o out.pdf ^
   -sDEVICE=pdfwrite ^
    in.pcl

应该将您的 PCL 转换为 PDF。对于 PostScript 级别 2,使用 -sDEVICE=ps2write .

但是,可能很难找到 pspcl6 的预编译二进制文件。 .尽管它是 Ghostscript 产品系列的一部分,但它并不广为人知。您可能需要构建 + 编译您自己的版本 from the sources .

更新:
  • http://code.google.com/p/ghostscript/downloads/detail?name=ghostpdl-8.71-win32.zip
  • http://code.google.com/p/ghostscript/downloads/list
  • 关于printing - 使用 Ghostscript 将 PCL 转换为 PostScript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4684261/

    相关文章:

    driver - 编写 Windows 打印机驱动程序

    linux - 检查文件修改日期和电子邮件是否已更改

    c -/proc/net/tcp Solaris 11 下的替代方案

    ghostscript - 如何使用 Ghostscript 和一系列页面特定裁剪框来裁剪多页 pdf

    php - 在php打印解决方案中选择纸张来源

    python - xlwt - 打印范围设置

    html - 如何设置 HTML 样式以在打印页面上显示 2 个数据卡?

    windows - 如何在 Windows 中创建虚拟打印机?

    Java-如何在屏幕上绘制像素

    java - 如何使用 JDBC 连接到 Solaris 操作系统中的 Oracle DB?