-
Bug
-
Resolution: Fixed
-
P3
-
1.0, 6, 6u10
-
b04
-
x86
-
windows_vista, windows_7
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2184022 | 7 | Jennifer Godinez | P3 | Resolved | Fixed | b77 |
JDK-2185313 | 5.0u23 | Abhijit Saha | P3 | Closed | Fixed | b01 |
JDK-2185923 | 1.4-pool | Abhijit Saha | P4 | Closed | Won't Fix |
FULL PRODUCT VERSION :
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b13)
Java HotSpot(TM) Client VM (build 11.0-b11, mixed mode, sharing)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b24)
Java HotSpot(TM) Client VM (build 12.0-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.0.6001]
EXTRA RELEVANT SYSTEM CONFIGURATION :
HP LaserJet 1100
Epson Stylus DX5050
A DESCRIPTION OF THE PROBLEM :
When printing multiple copies of a document the setting "Collate" is ignored in the native Dialog. Printing order is always n times page 1, n times page 2, ...
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the source.
2. Select "Collate" in the print dialog.
3. Start printing
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The result should contain 4 pages. Each containing one number in the following order: 0, 1, 0, 1
ACTUAL -
The result contains 4 pages. Each containing one number in the following order: 0, 0, 1, 1
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
public class PrintTest {
public static class TwoPages implements Printable {
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
throws PrinterException {
// print only two pages
if (pageIndex > 1) {
return NO_SUCH_PAGE;
}
// Ensure that text is visible
float x = (float) (pageFormat.getImageableX() + pageFormat
.getImageableWidth() / 2);
float y = (float) (pageFormat.getImageableY() + pageFormat
.getImageableHeight() / 2);
// print text
Graphics2D g2d = (Graphics2D) graphics;
g2d.drawString("" + pageIndex, x, y);
return PAGE_EXISTS;
}
}
public static void main(String[] args) throws PrinterException {
PrinterJob job = PrinterJob.getPrinterJob();
PageFormat pf = job.defaultPage();
job.setCopies(2);
job.setPrintable(new TwoPages(), pf);
if (job.printDialog()) {
job.print();
}
}
}
---------- END SOURCE ----------
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b13)
Java HotSpot(TM) Client VM (build 11.0-b11, mixed mode, sharing)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b24)
Java HotSpot(TM) Client VM (build 12.0-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.0.6001]
EXTRA RELEVANT SYSTEM CONFIGURATION :
HP LaserJet 1100
Epson Stylus DX5050
A DESCRIPTION OF THE PROBLEM :
When printing multiple copies of a document the setting "Collate" is ignored in the native Dialog. Printing order is always n times page 1, n times page 2, ...
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the source.
2. Select "Collate" in the print dialog.
3. Start printing
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The result should contain 4 pages. Each containing one number in the following order: 0, 1, 0, 1
ACTUAL -
The result contains 4 pages. Each containing one number in the following order: 0, 0, 1, 1
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
public class PrintTest {
public static class TwoPages implements Printable {
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
throws PrinterException {
// print only two pages
if (pageIndex > 1) {
return NO_SUCH_PAGE;
}
// Ensure that text is visible
float x = (float) (pageFormat.getImageableX() + pageFormat
.getImageableWidth() / 2);
float y = (float) (pageFormat.getImageableY() + pageFormat
.getImageableHeight() / 2);
// print text
Graphics2D g2d = (Graphics2D) graphics;
g2d.drawString("" + pageIndex, x, y);
return PAGE_EXISTS;
}
}
public static void main(String[] args) throws PrinterException {
PrinterJob job = PrinterJob.getPrinterJob();
PageFormat pf = job.defaultPage();
job.setCopies(2);
job.setPrintable(new TwoPages(), pf);
if (job.printDialog()) {
job.print();
}
}
}
---------- END SOURCE ----------
- backported by
-
JDK-2184022 Printing: "Collate" is ignored under Windows Vista x64
- Resolved
-
JDK-2185313 Printing: "Collate" is ignored under Windows Vista x64
- Closed
-
JDK-2185923 Printing: "Collate" is ignored under Windows Vista x64
- Closed
- duplicates
-
JDK-6648422 Print collate is not working on Vista with IE 7
- Closed
-
JDK-6868587 J2SE_2D_Reg:The order of copies is not collated correctly.
- Closed