// shows dialog if argument is null
 private void setPageFormat() // boolean showDialog)
     {
   try {
     PageFormat pf =
         CmdPageSetup.getPageFormat(
             fpp.getPageFormat(),
             application.getSettings(),
             application.getMainApplicationFrame());
     if (pf != null) {
       fpp.setPageFormat(pf);
     }
     showPages();
   } catch (Exception ex) {
     application.reportError(
         application.getI18NMessage("servoy.print.error.cannotCreatePreview"), ex); // $NON-NLS-1$
   }
   showPage(currentShowingPage); // show again in new Format
 }