mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
4885375: Page Ranges 'To Page' field must be populated based on Pageable
Reviewed-by: prr, jdv
This commit is contained in:
parent
3d1c3e2f60
commit
b68b46b14f
2 changed files with 175 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue