[OpenJDK 2D-Dev] [9] RFR 8170579: The "Banner page" checkbox is disabled

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Wed Dec 21 12:45:46 UTC 2016


Hi Phil,


On 12/21/2016 12:22 AM, Phil Race wrote:
> +1 to the changes although did you manage to confirm if it is specific 
> to a particular printer ?
It does not seem to be an issue with particular printer as submitter is 
experiencing it in Lexmark E260dn printer whereas we tested on Ricoh .
> I recommend installing 16.10 in a virtual box and taking a look at the 
> cups server (localhost:631)
> as well as the System Settings->Printers dialog.
We tested on ubuntu16.10 virtual box itself. It seems in ubuntu16.10, 
getAttMap
http://hg.openjdk.java.net/jdk9/client/jdk/file/dc658d7dde90/src/java.desktop/unix/classes/sun/print/IPPPrintService.java#l1767
does not have "job-sheet-supported" unlike ubuntu16.04 (which is why 
printer dialog is having it as disabled)
although cups server browser in 16.10 shows banner options default=none.
SInce getAttMap is response returned by cups server, I am not sure what 
can we do apart from forcefully making the job-sheet attribute supported 
ingetSupportedAttributeCategories()
just as we do for "collation".

Regards
Prasanta
> On 16.04 these so prominently let me specify job sheets I find it hard 
> to believe its gone in 16.10
>
> -phil.
>
> On 12/16/2016 02:38 AM, Prahalad Kumar Narayanan wrote:
>> Looks good.
>>
>> Thanks & Have a good day
>>
>> Prahalad N.
>>
>> -----Original Message-----
>> From: Prasanta Sadhukhan
>> Sent: Friday, December 16, 2016 2:15 PM
>> To: Prahalad Kumar Narayanan; 2d-dev at openjdk.java.net
>> Cc: Praveen Srivastava; Jayathirth D V
>> Subject: Re: [OpenJDK 2D-Dev] [9] RFR 8170579: The "Banner page" 
>> checkbox is disabled
>>
>> Thanks for the review.
>>
>> Yes, we need to bail out initially itself in BannerTest if there is 
>> no printer installed.
>>
>> We do not need to check for default banner option in BannerTest as 
>> opposed to TestCheckSystemDefaultBannerOption.java
>>
>> because the test checks if we can get Banner page once we "select"
>> Banner checkbox, so it will override the printer default banner option.
>>
>> Modified webrev:
>> http://cr.openjdk.java.net/~psadhukhan/8170579/webrev.01/
>>
>> Regards
>> Prasanta
>> On 12/16/2016 12:41 PM, Prahalad Kumar Narayanan wrote:
>>> Hello Prasanta
>>>
>>> I believe the 'Banner Page' setting on Print dialog maps to the 
>>> JobSheets attribute category.
>>> If this is right, the logic to check support for JobSheets attribute 
>>> category is correct.
>>>
>>> Few corner cases that I observed with BannerTest:
>>> . The test-case does not bail-out when run without any printer 
>>> installed on Ubuntu.
>>> . Secondly, how do we handle multiple printers installed on the machine
>>>            . The capabilities will vary across printers -> a printer 
>>> may not support printing BannerPage
>>>            . I believe, the test case should bail-out safely if the
>>> particular printer doesn't support BannerPage
>>>
>>> . The logic in other test-case within webrev-
>>> TestCheckSystemDefaultBannerOption.java, seems to handle both these
>>> conditions
>>>
>>> Thanks & Have a good day
>>>
>>> Prahalad N.
>>>
>>>
>>> ----------------------------------------------------------------------
>>>
>>> Message: 1
>>> Date: Tue, 13 Dec 2016 21:38:26 +0530
>>> From: Prasanta Sadhukhan <prasanta.sadhukhan at oracle.com>
>>> To: Philip Race <philip.race at oracle.com>, 2d-dev
>>>     <2d-dev at openjdk.java.net>
>>> Subject: Re: [OpenJDK 2D-Dev] [9] RFR 8170579: The "Banner page"
>>>     checkbox is disabled
>>> Message-ID: <5227445d-36c7-85a3-9d78-c8061e6e568a at oracle.com>
>>> Content-Type: text/plain; charset=utf-8; format=flowed
>>>
>>> Gentle reminder for review....
>>>
>>> Regards
>>> Prasanta
>>>
>>>
>>> On 12/7/2016 9:00 PM, Prasanta Sadhukhan wrote:
>>>> Hi All,
>>>>
>>>> Please review a fix for jdk9 where it is seen that "Banner" checkbox
>>>> in printer dialog is disabled in ubuntu16.10.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8170579
>>>> webrev: http://cr.openjdk.java.net/~psadhukhan/8170579/webrev.00/
>>>>
>>>> Issue was, in ubuntu16.10 the attribute map does not have
>>>> "job-sheet-supported" attribute returned by CUPS so this category is
>>>> not added to supported categories
>>>> [http://hg.openjdk.java.net/jdk9/client/jdk/file/7f09d558b044/src/jav
>>>> a .desktop/unix/classes/sun/print/IPPPrintService.java#l1030]
>>>>
>>>> so isAttributeCategorySupported() called by ServiceDialog returns
>>>> false
>>>> [http://hg.openjdk.java.net/jdk9/client/jdk/file/7f09d558b044/src/jav
>>>> a .desktop/share/classes/sun/print/ServiceDialog.java#l2763]
>>>> resulting in Banner checkbox getting disabled.
>>>>
>>>> Fix is to check if JobSheet category is supported in underlying
>>>> platform, only then proceed with the test.
>>>>
>>>> Regards
>>>> Prasanta
>>>
>>> ------------------------------
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20161221/7eff27fc/attachment.html>


More information about the 2d-dev mailing list