4885375: Page Ranges 'To Page' field must be populated based on Pageable

Reviewed-by: prr, jdv
This commit is contained in:
Prasanta Sadhukhan 2016-09-10 14:50:35 +05:30
parent 3d1c3e2f60
commit b68b46b14f
2 changed files with 175 additions and 0 deletions

View file

@ -1001,6 +1001,10 @@ public abstract class RasterPrinterJob extends PrinterJob {
// 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,