How do I print a PDF file using the new JDK 1.4 printing API?
Location: http://www.jguru.com/faq/view.jsp?EID=959950 Created: Jul 22, 2002 Modified: 2002-08-06 07:11:23.673 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Until someone provides a PDF print service, you can’t. The standard runtime does not provide one. Just because you can specify a DocFlavor of PDF (DocFlavor.STRING.INPUT_STREAM.PDF) doesn’t mean you can print one. From Ivo Limmen: You could use GhostScript to print the PDF using Process and Runtime.exec(). The tool is available for several platforms with the same command line options so portability isn’t a large problem. (Be sure to check the license though.