Hi everyone,
I have a question to ask about printer attributes. I am using the PrintRequestAttributeSet class and am a bit confused as to whether i will still have to use the PageFormat class to set the page format of my printed page.
See this below function
Code:public void prt( ) { PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet( ); prnJob = PrinterJob.getPrinterJob( ); PageFormat format = prnJob.defaultPage( ); //Do i still have to include the format in the below statement or //can i leave it out prnJob.setPrintable(myprintableclass, format); if (prnJob.printDialog(aset) == false) { return; } prnJob.print(aset); }
Basically i don't know that if i use the PrintRequestAttributeSet class the will page format will be passed to the printable like the PageFormat class
like its statement above
I hope i have not confused you guysCode:prnJob.setPrintable(myprintableclass, format);
I hope someone can help me with this confusion of mine
Thank You
Yours Sincerely
Richard West


Reply With Quote


Bookmarks