Setting Page Size When You Print a View

The way that page size is set depends on the method that you use to print.

When you use PrintDialog.show or ViewPrinter.print(boolean) to print, then the view printer finds the page size from the printer job (2D printing) or from the print job (AWT printing). You do not have to set anything.

When you use PageSetupDialog.show or PreviewDialog.show, you call the setPageFormat method to set the page format on the view printer.

When you use ViewPrinter.renderPage or ViewPrinter.printPage, you set the ViewDimension property of the view printer to set the paper size. The view printer treats the ViewDimension property as the page size, even if you print more than one object on a page.