A simple Java program that prints a PDF document using Qoppa’s library jPDFPrint. PDFPrint pdfPrint = new PDFPrint("input.pdf", null); pdfPrint.print (null);PDFPrint pdfPrint = new PDFPrint("input.pdf", null); pdfPrint.print (null); Download full Java Program to Print PDF
Category: jPDFPrint: Print PDFs
Developer library to print PDF documents in Java.
Code Sample: Convert PDF to Postcript in Java
A Java program that uses jPDFPrint to convert a PDF file to Postscript. The program queries the JVM for any print services that support Postscript output. At least one such services is always available in a Sun JVM. It then prints the PDF document, using jPDFPrint, to that print service, which will ouptut a Postcript file. ocFlavor […]
Running in non-GUI / non windowing servers
Q: I am getting the following error when running your library jPDFPrint in our SunOS environment. How can I fix it? Exception in thread "main" java.lang.InternalError: Can’t connect to X11 window server using ‘localhost:0.0’ as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62) at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:81) […]