Modified webrev to take care of a problem in webrev.01 whereby banner
page was getting printed by default.
Now, banner page will get printed only if the checkbox is checked in
printer dialog.
http://cr.openjdk.java.net/~psadhukhan/6575247/webrev.02/
Regards
Prasanta
On 7/22/2016 4:26 PM, Prasanta Sadhukhan wrote:
Hi Phil,
I have modified the code to check if job-sheets is supported and then
only proceed to print the banner page.
Also, rectified the jobTitle and banner confusion by adding jobsheet
check.
Also added the same code in UnixPrintJob even though I found its
printExecCmd() does not get executed in linux and solaris
PSPrinterJob's printExecCmd() is executed instead. In mac, neither
UnixPrinterJob#printExecCmd() nor PSPrinterJob#printExecCmd() gets
executed.
Tested on ubuntu and solaris 11 with the fix and banner page is
printed with the fix. In mac, cover page gets printed without any change.
http://cr.openjdk.java.net/~psadhukhan/6575247/webrev.01/
Regards
Prasanta
On 7/20/2016 8:56 PM, Philip Race wrote:
In my evaluation of that bug (which was 9 yrs ago so I do not have
any memory of it :-)), I note that we first need to check
that job-sheets is supported .. you are not doing that ..
what happens if we pass an unsupported option ?
"-o foobar" ?? This needs testing on Linux, OS X, and Solaris 11.
Also -J (job-title) is something you can see in the queue when
you do lpq. I don't know why it is tied to banner here but
removing it seems wrong. Perhaps this should be renamed from
"banner" and "BANNER" to jobTitle ?? Please examine this.
In fact you seem to be conflicting with the -o nobanner.
So in general we have some lack of clarity around job title and
banner page
(aka job sheet).
Also we have PSPrinterJob and UnixPrinterJob with similar code.
Please examine it to make sure no similar case is going missed.
-phil.
On 7/18/16, 4:27 AM, Prasanta Sadhukhan wrote:
Hi All,
Please review a fix for an issue where it is seen that Banner page
in linux does not get printed despite user selecting the Banner page
checkbox in Printer dialog.
Bug: https://bugs.openjdk.java.net/browse/JDK-6575247
webrev: http://cr.openjdk.java.net/~psadhukhan/6575247/webrev.00/
It seems if we pass "-J <bannername>" option to lpr command, it has
no effect.
To print Banner page, we need to pass
"-o job-sheets=<either of "classified", "confidential", "secret",
"standard", "topsecret", or "unclassified">"
Since we support only standard banner or none via a checkbox,
the proposed fix passes option "-o job-sheets=standard" to lpr
command to print the banner page.
Regards
PRasanta