Printing in Java using PS file

做~自己de王妃 提交于 2019-12-22 10:39:21

问题


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?


回答1:


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.

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



来源:https://stackoverflow.com/questions/4046842/printing-in-java-using-ps-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!