File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes PDFbox gives headless exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "PDFbox gives headless exception" Watch "PDFbox gives headless exception" New topic

PDFbox gives headless exception

Stan F Smith

Joined: Jun 28, 2011
Posts: 20

I am tying to create a site that at one point automatically opens the browsers printing dialog box with a streamed PDF.
It currently works on my machine but when we deploy to the test server i get the error:

No X11 DISPLAY variable was set, but this program performed an operation which requires it. at sun.print.PSPrinterJob.printDialog(
     at org.pdfbox.pdmodel.PDDocument.print(

Can someone please help me solve this.

Don't get me started about those stupid light bulbs.
subject: PDFbox gives headless exception
It's not a secret anymore!