Skip to content

Commit ec2c56d

Browse files
committed
backport 623ab91b0a6ee3c957c36adb179fc4baea770b6d
1 parent 33d9650 commit ec2c56d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,9 @@ private void setRangeCopiesAttribute(int from, int to, boolean isRangeSet,
17441744
attributes.add(new PageRanges(from, to));
17451745
setPageRange(from, to);
17461746
} else {
1747-
attributes.remove(PageRanges.class);
1747+
// Sets default values for PageRange attribute and setPageRange
1748+
attributes.add(new PageRanges(1,
1749+
Integer.MAX_VALUE));
17481750
setPageRange(Pageable.UNKNOWN_NUMBER_OF_PAGES,
17491751
Pageable.UNKNOWN_NUMBER_OF_PAGES);
17501752
}

test/jdk/java/awt/print/PrinterJob/PageRanges.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* @test
26-
* @bug 6575331 8297191 8373239
26+
* @bug 6575331 8297191 8373239 8378417
2727
* @key printer
2828
* @summary The specified pages should be printed.
2929
* @run main/manual=yesno PageRanges

0 commit comments

Comments
 (0)