使用 PCL 和 PHP 中的 PJL 打印 PDF
PRINT PDF using PCL AND PJL in PHP
我们办公室有一些 ricoh 打印机,我们想使用一个简单的套接字从 php 打印,但有些文档是预先打印的并且位于纸盒 2 中,默认纸张在纸盒 1 中。我希望能够使用 PJL PDF 和 PJL PCL 语言的组合 select 该打印机的托盘。有人有想法吗?我在论坛上找到了这个:
<ESC>%-12345X@PJL<CR><LF>
@PJL SET STAPLE=LEFTTOP<CR><LF>
@PJL [... more PJL commands if required ...]
@PJL ENTER LANGUAGE = PDF<CR><LF>
[... all bytes of the PDF file, starting with '%PDF-1.' ...]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file, ending with '%%EOF' .......]
<ESC>%-12345X
它打印我的 pdf,但是当我添加
@PJL ENTER LANGUAGE = PCL<CR><LF>
<ESC>&l1H <CR><LF>
围绕该代码。
我得到了一些奇怪的结果...1 个 pdf 分成 5 篇论文,只有流数据(奇怪的迹象)。
所以我做了以下事情
<ESC>%-12345X@PJL<CR><LF>
@PJL ENTER LANGUAGE = PCL<CR><LF>
<ESC>&l1H <CR><LF>
<ESC>%-12345X@PJL<CR><LF>
@PJL SET STAPLE=LEFTTOP<CR><LF>
@PJL [... more PJL commands if required ...]
@PJL ENTER LANGUAGE = PDF<CR><LF>
[... all bytes of the PDF file, starting with '%PDF-1.' ...]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file, ending with '%%EOF' .......]
<ESC>%-12345X
但是这再次从纸盘 1 打印文件,似乎在尝试打印 pdf 文件时丢失了设置...
有人给我提示或可以更正吗?我想我快到了......
将纸张类型设置为纸盘选择的解决方法:
Not all printers with PDF Direct Print feature support the PJL mediasource instruction; e.g. Ricoh aficio printers do not.
After weeks of struggling, I finally managed to get hold of the Ricoh manuals relating to PJL instructions supported by Ricoh.
Ricoh supports the @PJL SET MEDIATYPE=SPECIAL – special is the paper as defined for a specific tray. You can assign a specific paper type for a tray, so requiring a specific paper results in using a specific tray. And provided the printer is properly configured (trays need to be set to “automatically selected”), this finally works.
来源:http://www.tachytelic.net/2010/10/hp-direct-pdf-printing-and-printer-tray-control/
我也对使用 PJL 包装 pdf 的无驱动打印感兴趣,也对使用 Ricoh 打印机感兴趣,请让我更新。
您使用的理光机型有哪些?
TIA
我们办公室有一些 ricoh 打印机,我们想使用一个简单的套接字从 php 打印,但有些文档是预先打印的并且位于纸盒 2 中,默认纸张在纸盒 1 中。我希望能够使用 PJL PDF 和 PJL PCL 语言的组合 select 该打印机的托盘。有人有想法吗?我在论坛上找到了这个:
<ESC>%-12345X@PJL<CR><LF>
@PJL SET STAPLE=LEFTTOP<CR><LF>
@PJL [... more PJL commands if required ...]
@PJL ENTER LANGUAGE = PDF<CR><LF>
[... all bytes of the PDF file, starting with '%PDF-1.' ...]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file, ending with '%%EOF' .......]
<ESC>%-12345X
它打印我的 pdf,但是当我添加
@PJL ENTER LANGUAGE = PCL<CR><LF>
<ESC>&l1H <CR><LF>
围绕该代码。 我得到了一些奇怪的结果...1 个 pdf 分成 5 篇论文,只有流数据(奇怪的迹象)。
所以我做了以下事情
<ESC>%-12345X@PJL<CR><LF>
@PJL ENTER LANGUAGE = PCL<CR><LF>
<ESC>&l1H <CR><LF>
<ESC>%-12345X@PJL<CR><LF>
@PJL SET STAPLE=LEFTTOP<CR><LF>
@PJL [... more PJL commands if required ...]
@PJL ENTER LANGUAGE = PDF<CR><LF>
[... all bytes of the PDF file, starting with '%PDF-1.' ...]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file ............................]
[... all bytes of the PDF file, ending with '%%EOF' .......]
<ESC>%-12345X
但是这再次从纸盘 1 打印文件,似乎在尝试打印 pdf 文件时丢失了设置...
有人给我提示或可以更正吗?我想我快到了......
将纸张类型设置为纸盘选择的解决方法:
Not all printers with PDF Direct Print feature support the PJL mediasource instruction; e.g. Ricoh aficio printers do not. After weeks of struggling, I finally managed to get hold of the Ricoh manuals relating to PJL instructions supported by Ricoh. Ricoh supports the @PJL SET MEDIATYPE=SPECIAL – special is the paper as defined for a specific tray. You can assign a specific paper type for a tray, so requiring a specific paper results in using a specific tray. And provided the printer is properly configured (trays need to be set to “automatically selected”), this finally works.
来源:http://www.tachytelic.net/2010/10/hp-direct-pdf-printing-and-printer-tray-control/
我也对使用 PJL 包装 pdf 的无驱动打印感兴趣,也对使用 Ricoh 打印机感兴趣,请让我更新。 您使用的理光机型有哪些?
TIA