Well, that's the limit of my knowledge.  Hopefully there's someone else on the 
list with more specific knowledge.
However, since the error appears to be thrown from the printer software  
        sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:401)
you might want to check the documentation there to be sure it is getting the 
info about running headless.

--Ken


On Jul 15, 2011, at 3:39 PM, stephen smith wrote:

> 
> Thanks!
> 
> Yes we have done that. I also test to see that Headless == true before I 
> print, and it does. We still get the error.
> 
> Any ideas?
> 
> Thanks
> 
> 
> 
> 
>> Subject: Re: PDF prints on local, on server gives HeadlessException
>> From: [email protected]
>> Date: Fri, 15 Jul 2011 14:41:53 -0400
>> To: [email protected]
>> 
>> Almost certainly you need to run in Headless mode. Check out:
>> 
>> http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/
>> 
>> --Ken
>> On Jul 15, 2011, at 12:25 PM, stephen smith wrote:
>> 
>>> 
>>> Hello,
>>> 
>>> I am printina pdf using PDFBox. It works great on out local dev boxes but 
>>> when we move to the server it gives the error:
>>> java.awt.HeadlessException
>>> at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:401)
>>> at org.pdfbox.pdmodel.PDDocument.print(PDDocument.java:831)...
>>> 
>>> Can anyone help with this?
>>> 
>>> Thanks
>>> 
>> 
>                                         

Reply via email to