打印机通用接口

发布于 2024-09-12 04:01:48 字数 89 浏览 3 评论 0原文

现在常见的打印机接口是什么?我读过其中大多数都支持 PostScript 和/或 PCL。我应该如何从应用程序代码中使用 PS/PCL(例如,在 Win32 下)?

What is a common printer interface today? I've read most of them support PostScript and/or PCL. How should I use PS/PCL from an app code (say, under Win32)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

洛阳烟雨空心柳 2024-09-19 04:01:48

据我所知,PostScript 和 PCL 都是开放规范。 PostScript 的权威来源是 PLRM (PostScript 语言参考手册)。 PCL 的等效项可以在此页面找到。

大多数用于办公环境的现代多功能打印机都接受多种不同的 PDL。 PostScript 和 PCLXL 是最常见的,但其他一些是:

  • PDF,某些打​​印机支持直接渲染 PDF。
  • XPS,微软的 XML 纸张规范。
  • TIFF,仅位图的页面表示形式。

许多制造商还实施专有的 PDL。由于 PostScript、PDF 和 XPS 的解析和渲染速度可能很慢,因此制造商通常会实施针对打印机硬件和固件进行优化的专有 PDL。只有使用制造商定制的 PDL 驱动程序,才能实现许多制造商额定的每分钟页数。这种技术也被低端预算打印机使用,这些打印机的硬件无法解释高级 PDL。

在生成此输出方面,通常您不需要这样做,而是应该通过 Windows GDI,或根据您的目标操作系统,GDI+.您的绘图和文本输出例程将由打印机驱动程序处理,而打印机驱动程序又会为特定打印机生成输出。还有通用驱动程序(Microsoft 包含通用 PostScript 打印机驱动程序),可用于生成不特定于任何特定打印机的输出。

PostScript and PCL are both open-spec as far as I am aware. The definitive source for PostScript would be the PLRM (PostScript Language Reference Manual). PCL's equivalent can be found at this page.

Most modern multi-function printers for office environments will accept a number of different PDLs. PostScript and PCLXL are the most common, but some others are:

  • PDF, some printers support rendering PDFs directly.
  • XPS, Microsoft's XML Paper Specification.
  • TIFF, a bitmap-only page representation.

Many manufacturers also implement a proprietary PDL. Since PostScript, PDF and XPS can be slow to parse and render, a manufacturer often implements a proprietary PDL that is optimised for the printer's hardware and firmware. A lot of manufacturer-rated page-per-minute counts are only possible if you use their custom PDL driver. This technique is also used by low-end budget printers where the hardware is incapable of interpreting high-level PDLs.

In terms of generating this output, usually you do not need to do so, instead you should go through Windows GDI, or depending on your target OS, GDI+. Your drawing and text-output routines will be handled by a printer driver which in turn will generate output for a specific printer. There are also generic drivers out there (Microsoft includes a generic PostScript printer driver) that can be used to generate output that is not specific to any particular printer.

无法回应 2024-09-19 04:01:48

在 Windows 中,您通常使用 GDI 并让打印机驱动程序将其转换为实际的打印机语言。这为您提供了完全的设备独立性。

In Windows, you generally use the GDI and let the printer driver translate it to the actual printer language. This gives you complete device independence.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文