Print pdf in applet using itext
I have an issue printing pdf file in applet. I got input from http and the stream is开发者_C百科 consutructed using the pdfstamper. The problem is that i want to send the resulted stream to printer, but i did not find how to do that.
UNless the printer supports PDF you cannot send it directly to the printer. You need to rasterize it. I wrote a blog article on printing PDFs from Java at http://www.jpedal.org/PDFblog/2010/01/printing-pdf-files-from-java/
PDFBox might manage it. I'm not aware of any other Java-specific PDF renderers out there, though I wouldn't be shocked to find there's a couple more out there.
Basically, any app that can convert a PDF to an image can probably act as a print driver.
GhostScript perhaps?
精彩评论