[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] [12] RFR JDK-8211055:Provide print to a file (PDF) feature even when printer wa
From: Philip Race <philip.race () oracle ! com>
Date: 2018-10-03 0:01:12
Message-ID: 5BB406C8.2020302 () oracle ! com
[Download RAW message or body]
Good enough to fix the regression.
+1
-phil.
On 9/26/18, 11:24 PM, Prasanta Sadhukhan wrote:
>
> I have added @requires tag and also did an initial check of existing
> printers and exit if there is any.
>
> Regarding setting,retrieving Destination attribute, if we do not show
> the print dialog and ask user to select file and ok,
> it will not set call nsPrintInfoToJavaPrinterJob which is called from
> showDialog() and so NSPrintJobDispositionValuewill not be set up and
> setPrintToFile() will not be called.
>
> I checked in jdk8GA too, it fails if we set Destination and try to
> print. I guess existing customer issue is about not printing if user
> manually selects "Save as PDF". I guess I can work on that issue as a
> separate bug.
> Modified test
> webrev:http://cr.openjdk.java.net/~psadhukhan/8211055/webrev.1/
>
> Regards
> Prasanta
> On 26-Sep-18 9:48 PM, Phil Race wrote:
> > This is all MacOS specific changes - and functionality - but the test
> > seems
> > to be cross-platform. Shouldn't it at least have an @requires macos tag ?
> >
> > And I think the test should verify there are no printers and say it can't
> > be run if you have any ... and exit ...
> >
> > Can we set & retrieve the file as a Destination attribute ?
> > Then we can verify the file was saved without the user's help
> >
> >
> > 123 " 4. Another dialog opends prompting for filename, enter any \
> > filename and press \"Save\".\r\n" +
> > opends -> opens
> >
> > -phil.
> >
> > On 09/26/2018 04:38 AM, Prasanta Sadhukhan wrote:
> > > Hi All,
> > >
> > > Please review a fix for an issue where it is seen that if we do not
> > > have any printer installed and we try to save the printjob to a file
> > > via "Save as PDF" option in mac, it was throwing PrinterExcetion:no
> > > printer service found.
> > >
> > > This is a regression of JDK-8132988 where a check was added to make
> > > sure PrinterException is thrown if there is no printer installed.
> > > Proposed fix is to find out if user is selecting "Save as PDF"
> > > option in native print dialog which will cause NSPrintInfo's
> > > jobDisposition value to be |NSPrintSaveJob
> > > [https://developer.apple.com/documentation/appkit/nsprintinfo/1528717-jobdisposition?language=objc]
> > >
> > > > In that case, the previous "no-printer" check is amended to also
> > > check if the print operation is saving to a file, in which case do
> > > not throw PrinterException and proceed with Save-File operation.
> > > JDK-8132988 testcase also works ok after this fix.
> > >
> > > Bug: https://bugs.openjdk.java.net/browse/JDK-8211055
> > > webrev: http://cr.openjdk.java.net/~psadhukhan/8211055/webrev.0/
> > >
> > > Regards
> > > Prasanta
> > > > >
> >
>
[Attachment #3 (text/html)]
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Good enough to fix the regression.<br>
<br>
+1<br>
<br>
-phil.<br>
<br>
On 9/26/18, 11:24 PM, Prasanta Sadhukhan wrote:
<blockquote
cite="mid:bd6d11b8-a7fd-241f-89d7-49e9ebfeb929@oracle.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>I have added @requires tag and also did an initial check of
existing printers and exit if there is any.<br>
</p>
Regarding setting,retrieving Destination attribute, if we do not
show the print dialog and ask user to select file and ok, <br>
it will not set call nsPrintInfoToJavaPrinterJob which is called
from showDialog() and so <span class="new">NSPrintJobDispositionValuewill
not be set up and </span><span class="new">setPrintToFile</span><span
class="new"></span>() will not be called.<br>
<br>
I checked in jdk8GA too, it fails if we set Destination and try to
print. I guess existing customer issue is about not printing if
user manually selects "Save as PDF". I guess I can work on that
issue as a separate bug.<br>
Modified test webrev:<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Epsadhukhan/8211055/webrev.1/">http://cr.openjdk.java.net/~psadhukhan/8211055/webrev.1/</a><br>
<br>
Regards<br>
Prasanta<br>
<div class="moz-cite-prefix">On 26-Sep-18 9:48 PM, Phil Race
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:07241a48-10e7-3073-4ea6-40f70ab41071@oracle.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
This is all MacOS specific changes - and functionality - but the
test seems<br>
to be cross-platform. Shouldn't it at least have an @requires
macos tag ?<br>
<br>
And I think the test should verify there are no printers and say
it can't<br>
be run if you have any ... and exit ...<br>
<br>
Can we set & retrieve the file as a Destination attribute ?<br>
Then we can verify the file was saved without the user's help<br>
<br>
<br>
<pre> 123 " 4. Another dialog opends prompting for filename, \
enter any filename and press \"Save\".\r\n" +</pre> <br>
opends -> opens<br>
<br>
-phil.<br>
<br>
<div class="moz-cite-prefix">On 09/26/2018 04:38 AM, Prasanta
Sadhukhan wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8af8c638-c259-d5c5-111b-3df2e8cc20ce@oracle.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
Hi All,<br>
<br>
Please review a fix for an issue where it is seen that if we
do not have any printer installed and we try to save the
printjob to a file<br>
via "Save as PDF" option in mac, it was throwing
PrinterExcetion:no printer service found.<br>
<br>
This is a regression of JDK-8132988 where a check was added to
make sure PrinterException is thrown if there is no printer
installed.<br>
Proposed fix is to find out if user is selecting "Save as PDF"
option in native print dialog which will cause NSPrintInfo's
jobDisposition value to be <code \
class="code-voice"><span>NSPrint<wbr>Save<wbr>Job<br> [<a \
class="moz-txt-link-freetext" \
href="https://developer.apple.com/documentation/appkit/nsprintinfo/1528717-jobdisposition?language=objc"
moz-do-not-send="true">https://developer.apple.com/documentation/appkit/nsprintinfo/1528717-jobdisposition?language=objc</a>]<br>
<br>
</span></code>In that case, the previous "no-printer" check
is amended to also check if the print operation is saving to a
file, in which case do not throw PrinterException and proceed
with Save-File operation.<br>
JDK-8132988 testcase also works ok after this fix.<br>
<br>
Bug: <a class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8211055"
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8211055</a><br>
webrev: <a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Epsadhukhan/8211055/webrev.0/"
moz-do-not-send="true">http://cr.openjdk.java.net/~psadhukhan/8211055/webrev.0/</a><br>
<br>
Regards<br>
Prasanta<br>
<code class="code-voice"><span></span></code> </blockquote>
<br>
</blockquote>
<br>
</blockquote>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic