Results 1 to 1 of 1
Thread: javax.print setting attributes
- 02-03-2011, 03:34 PM #1Member
- Join Date
- Feb 2011
- Rep Power
javax.print setting attributes
There's no section for javax.print so -
I have a program for printing a pdf file that was generated using the iText 2 package.
The file is created as an A4 document.
The program is able to load the file and send the print job - it reaches the printer, but on the printer the control panel prompts the user to load A4, Plain Paper. The print job will come out if the user presses "OK" on the printer to override and print to whatever paper is loaded.
I need it to print directly without user intervention, as the same file prints directly from Adobe Reader without this problem.
I also need it to print 2 copies and it only prints one.
Here is the code for creating the print job:
PrintRequestAttributeSet preqats = new HashPrintRequestAttributeSet(); preqats.add(new Copies(2)); preqats.add(MediaTray.MAIN); preqats.add(MediaSizeName.ISO_A4); job.print(doc, preqats);
Printer model is HP LJ P3015.
The printer is hosted on a Windows Server 2003 machine.
I have set the printer defaults to:
Paper size = A4
Paper source = Auto
Paper Type = Unspecified
In the printer setup I have selected the paper size and types to Auto and unspecified.
So in PrintRequestAttributes or DocPrintJobAttributes how do I make sure
my print job is not trying to override the default paper type?
Last edited by prodtechjoshim; 02-03-2011 at 04:09 PM.
- By tashimoto in forum New To JavaReplies: 2Last Post: 12-01-2010, 09:45 PM
- By sandeepsai17 in forum New To JavaReplies: 0Last Post: 07-13-2009, 10:27 AM
- By ahtiven in forum New To JavaReplies: 3Last Post: 01-13-2009, 03:54 PM
- By Nicholas Jordan in forum Advanced JavaReplies: 0Last Post: 01-05-2009, 08:03 AM
- By Java Tip in forum java.awtReplies: 0Last Post: 06-22-2008, 11:04 PM