< prev index next >

src/java.desktop/share/classes/sun/print/RasterPrinterJob.java

Print this page

        

*** 999,1008 **** --- 999,1012 ---- int y = 50; PrintService newService; // temporarily add an attribute pointing back to this job. PrinterJobWrapper jobWrapper = new PrinterJobWrapper(this); attributes.add(jobWrapper); + PageRanges pgRng = (PageRanges)attributes.get(PageRanges.class); + if (pgRng == null && mDocument.getNumberOfPages() > 1) { + attributes.add(new PageRanges(1, mDocument.getNumberOfPages())); + } try { newService = ServiceUI.printDialog(gc, x, y, services, service, DocFlavor.SERVICE_FORMATTED.PAGEABLE,
< prev index next >