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 […]

Read More

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) […]

Read More