Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing to a printer mailbox using java  RSS feed

 
Eric Tunstall
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am attempting to print a document to a Printer Mailbox.

So far I have only had marginal success.

When using

PrinterJob.getPrinterJob();

I can do job.printDialog and the printer dialog opens up with the properties available. I can pick my Output Method of Store and select my Store Destination.

I have done this and was able to print out a line of text.

Woot!


Now I have a document any random document.

I do

PrintService ps = PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob dj = ps.createPrintJob();
Doc doc = new SimpleDoc(is,df,null);

dj.print(doc, null);

AND it goes to the printer and prints. Not to the mailbox.

I have no way to open the print dialog like I did initially. Its just not available.

MORE Research and I find.

that I can open a print dialog doing this.
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
PrintService service = ServiceUI.printDialog(null, 200, 200, printService, defaultService, flavor, pras);

GREAT!!..

But the properties button of the Printer set up in the dialog is greyed out and if I print the file goes straight to the printer and not the mailbox.


I did some looking and found that the IPP protocol has a mailbox-N attribute listed in it

Found here http://tools.ietf.org/html/draft-ietf-ipp-output-bin-attr-00

Is this something that can be used by javax.print api??

Thanks for any help.
Eric



 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!