• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Job name when printing file

 
Paulo Carvalho
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I made a Java application which prints a file.

When the application sends the file for print, I define an attribute to give a name for the print Job so I can recognize the file being printed. To do this I have the following code:

...
// Monitor print job events
PrintJobManagment pjm = new PrintJobManagment(dPJ);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(new JobName("1.doc", null));
dPJ.print(doc, pras);
...


Using java 1.6, everything works fine. When I open the printer queue I can see the file ("1.doc") being printed.

Using Java 1.5 the result is not the same: When I open the printer queue I can see a file being printed but I cannot identify it by this name. It is always called "Local Document" (or something similar).

As I must use Java 1.5 and I must be able to recognize the file being printed, anaybody can give me some information about this problem? Who can I resolve it? Is there any workaround?

Thanks
Regards
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do the Javadocs tell you of a change to the API between 1.5 and 1.6?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic