}.start();
pi.getPageable().getPageFormat(0).setOrientation(pageFormatOrientation);  MediaPrintableArea mediaPrintableArea = (MediaPrintableArea) printRequestAttributeSet.get(MediaPrintableArea.class);  Paper paper = pi.getPageable().getPageFormat(0).getPaper();  paper.setImageableArea(mediaPrintableArea.getX(MediaPrintableArea.INCH) * 72.0, mediaPrintableArea.getY(MediaPrintableArea.INCH) * 72.0, mediaPrintableArea.getWidth(MediaPrintableArea.INCH) * 72, mediaPrintableArea.getHeight(MediaPrintableArea.INCH) * 72);  pi.getPageable().getPageFormat(0).setPaper(paper);   com.cosylab.vdct.graphics.printing.Page.setPageFormat(pageFormat);
public void pageSetupMenuItem_ActionPerformed(java.awt.event.ActionEvent actionEvent) {	final java.awt.print.PrinterJob job = java.awt.print.PrinterJob.getPrinterJob();		new Thread() {			public void run() {				com.cosylab.vdct.graphics.printing.Page.setPageFormat(job.pageDialog(com.cosylab.vdct.graphics.printing.Page.getPageFormat()));			}		}.start();}