[OpenJDK 2D-Dev] [12] RFR JDK-8211055:Provide print to a file (PDF) feature even when printer was not connected

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Wed Sep 26 11:38:33 UTC 2018

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

|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/

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

More information about the 2d-dev mailing list