|
How to display the page format dialog |
|
|
This Java tip explains a method of displaying a page format dialog. This may help developer
to give an option to the user to change the default page format values such as the orientation
and paper size.
PrinterJob printtask = PrinterJob.getPrinterJob();
// Change default page format settings if necessary.
PageFormat format = printtask.defaultPage();
format.setOrientation(PageFormat.LANDSCAPE);
// Display page format dialog with page format settings.
format = printtask.pageDialog(pf);
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.