[OpenJDK 2D-Dev]  RFR JDK-8165947: One more page printed before the test page with OpenJDK.
Jayathirth D V
jayathirth.d.v at oracle.com
Mon Sep 19 09:15:14 UTC 2016
Changes are working fine.
From: Prasanta Sadhukhan
Sent: Friday, September 16, 2016 3:52 PM
To: Philip Race; 2d-dev
Subject: [OpenJDK 2D-Dev]  RFR JDK-8165947: One more page printed before the test page with OpenJDK.
Please review a fix for a tck failure in jdk9 whereby "banner page"
(cover page) is printed by default when print() is called directly without any print dialog being shown.
Issue was in RasterPrinterJob, "noJobSheet" variable was set to false which when passed to PSPrinterJob#printExecCmd(), it results in adding "-o job-sheets=standard" to lpr command and therefore, Banner page was getting printed by default.
Proposed fix is to check for defaultAttributeValue for JobSheets attribute so that we can find what is the default value reported by underlying platform and set "noJobSheet" value to default jobsheet native value (like CUPS report job-sheet=none so that no banner page is to be printed by default even though it supports jobsheet)
I tested "6575247:Banner checkbox in PrinterJob print dialog doesn't work" testcase in windows, solaris, linux and it works as expected.
JCK test api/javax_swing/interactive/PrintTest.html#PrintTest via command "/jdk-9/bin/java -showversion -Dswing.defaultlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel -cp
-platform.hasPrinter true -TestCaseID ALL"
also works ie no banner page is printed by default.
More information about the 2d-dev