RFR: 8223717: javafx printing: Support Specifying Print to File in the API [v3]

Phil Race prr at openjdk.java.net
Thu Jun 24 23:00:48 UTC 2021


On Thu, 24 Jun 2021 22:38:40 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8223717: javafx printing: Support Specifying Print to File in the API
>
> modules/javafx.graphics/src/main/java/javafx/print/JobSettings.java line 490:
> 
>> 488:      * setting will be ignored.
>> 489:      * If the URL specifies a non-existent path, or does not specify
>> 490:      * a writable file it may be ignored, or a SecurityException may be thrown.
> 
> I want to look at what we do for other properties like this. I'm not sure how feasible it is to throw an exception back to the application. And I wouldn't want to single out a security exception (what about a read-only file system?). I think that whatever the reason, if the file can't be written to, we should treat it consistently. Probably by ignoring the request. I presume that's what will happen if the print driver doesn't support print-to-file?

Not easy to specify exactly. We are handing it off to 2D
We aren't doing any up-front verification here, but I don't want to copy 2D behaviour into the docs, even if I could be sure about that .. I may just want to be more waffly about what happens.
Could be printed to the printer, could be a failed job, could be an exception of some kind if some nice piece of Java code recognises a problem up-front

-------------

PR: https://git.openjdk.java.net/jfx/pull/543


More information about the openjfx-dev mailing list