Results 1 to 4 of 4
Thread: Job name when printing file
- 12-16-2008, 12:27 PM #1
Member
- Join Date
- Nov 2008
- Posts
- 17
- Rep Power
- 0
Job name when printing file
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
- 12-22-2008, 02:11 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Is that Java API talking about any deprecation on 1.6 features? I cannot see any other cause for this.
- 12-22-2008, 03:50 PM #3
Member
- Join Date
- Nov 2008
- Posts
- 17
- Rep Power
- 0
The bug is known
I searched more and I found that it is a known bug by sun and it has been corrected on Java 1.6.
Sun Bug ID: 4988628.
I would like to know if there is a workaround to resolve the problem with java 1.5.
Thanks
Regards
- 12-23-2008, 01:55 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If Suns' corrected this bug on 1.6, I don't think there is a way to do it in 1.5. But there can be another approach, but I didn't get a way into my mind at once.
Why don't you work on with 1.6, all the things you have done on 1.5 is possible on 1.6 as well. Only thing may you have to do is remove deprecated stuff. But between 1.5 and 1.6 there is no huge difference.
Similar Threads
-
Help in Printing
By kirly in forum Advanced JavaReplies: 3Last Post: 10-03-2011, 03:40 PM -
Printing Example
By Java Tip in forum SWTReplies: 0Last Post: 07-11-2008, 04:41 PM -
Problem after Printing GUI.
By coldblood22 in forum AWT / SwingReplies: 1Last Post: 04-05-2008, 02:43 PM -
Printing using java
By ramachandran in forum Advanced JavaReplies: 1Last Post: 01-05-2008, 10:16 AM -
printing problem
By ntpl in forum AWT / SwingReplies: 0Last Post: 11-27-2007, 11:20 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks