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:
I am running this on a Windows 7 32-bit machine.
PrintRequestAttributeSet preqats = new HashPrintRequestAttributeSet();
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?