freesoft_2000 9 Practically a Master Poster

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

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 page format will be passed to the printable like the PageFormat class
like its statement above

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.