![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e683. Setting the Orientation of a Printed PagePrinterJob pjob = PrinterJob.getPrinterJob(); PageFormat pf = pjob.defaultPage(); if (portrait) { pf.setOrientation(PageFormat.PORTRAIT); } else { pf.setOrientation(PageFormat.LANDSCAPE); } pjob.setPrintable(printable, pf); try { pjob.print(); } catch (PrinterException e) { }
e682. Getting the Dimensions of a Printed Page e684. Printing Pages with Different Formats e685. Displaying the Page Format Dialog e686. Displaying the Print Dialog © 2002 Addison-Wesley. |