src/java.desktop/share/classes/sun/print/RasterPrinterJob.java
Print this page
@@ -556,10 +556,16 @@
page.setOrientation(PageFormat.LANDSCAPE);
} else {
page.setOrientation(PageFormat.PORTRAIT);
}
+ setPaperFromAttributes(page, service, attSet);
+ return page;
+ }
+
+ protected void setPaperFromAttributes(PageFormat page,
+ PrintService service, PrintRequestAttributeSet attSet) {
Media media = (Media)attSet.get(Media.class);
if (media == null) {
media =
(Media)service.getDefaultAttributeValue(Media.class);
}
@@ -609,11 +615,10 @@
ih = h * 0.75;
}
}
paper.setImageableArea(ix, iy, iw, ih);
page.setPaper(paper);
- return page;
}
protected void updatePageAttributes(PrintService service,
PageFormat page) {
if (this.attributes == null) {