利用PS文件中的Java打印 [英] Printing in Java using PS file
问题描述
我有一个生成后脚本文件,并想用它来打印。怎么能在java中实现或者使用的javax打印API或AWT。这可能吗?
I have a generated post script file and want to print using it. How can it be achieved in java either using javax print API or AWT. Is it possible?
推荐答案
复杂。请问您的打印机(S)支持PostScript?它是网络?如果是这样,大多数网络打印机可以谈LPR,你可以推的文件覆盖原样。在Windows上,你也可以流的文件,是对 LPT1:
通过映射端口的东西像 NET USE LPT1:\\\\ [计算机名] \\打印机/ PERSISTENT:YES
Complicated. Does your printer(s) support PostScript? Is it networked? If so, most networked printers can talk LPR and you can shove the file over as-is. On Windows, you could also stream the file as-is to the lpt1:
mapped port via something like NET USE LPT1: \\[Computer Name]\Printer /PERSISTENT:YES
.
如果你是一个服务器上,你做很多的PostScript处理和打印机的基础设施支持的话,我会非常期待到LPR协议。我已经写了几个LPR / LPD管理功能,在Java中处理打印机的作业,所以definetely知道它可以与一些相对容易完成。
If you're on a server and you do lots of PostScript handling and your printer infrastructure supports it, I would very much look into the LPR protocol. I've written several LPR/LPD management functions in Java to handle printer jobs, so definetely know it can be done with some relative ease.
http://tools.ietf.org/pdf/rfc1179.pdf
这篇关于利用PS文件中的Java打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!