painter = document.getPrintable(pageIndex);
} catch (Exception e) {
PrinterException pe =
new PrinterException("Error getting page or printable.[ " +
e +" ]");
pe.initCause(e);
throw pe;
}
/* Get the imageable area from Paper instead of PageFormat
* because we do not want it adjusted by the page orientation.