The page format dialog allows the user to change the default page format values such as the orientation and paper size.

    PrinterJob pjob = PrinterJob.getPrinterJob();
    
    // Get and change default page format settings if necessary.
    PageFormat pf = pjob.defaultPage();
    pf.setOrientation(PageFormat.LANDSCAPE);
    
    // Show page format dialog with page format settings.
    pf = pjob.pageDialog(pf);

 

Related Examples

相关文章:

  • 2022-03-04
  • 2021-11-03
  • 2022-12-23
  • 2021-11-19
  • 2022-01-25
  • 2021-11-30
  • 2022-12-23
猜你喜欢
  • 2021-10-20
  • 2021-04-17
  • 2022-12-23
  • 2021-12-10
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案