Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing to a printer mailbox using java

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

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

So far I have only had marginal success.

When using


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.


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);


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

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

Thanks for any help.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic