Attributes

F

freesoft_2000

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

Code:
prnJob.setPrintable(myprintableclass, format);

I hope i have not confused you guys

I hope someone can help me with this confusion of mine

Thank You

Yours Sincerely

Richard West
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top