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

Phil Race prr at openjdk.java.net
Thu Jun 24 22:21:18 UTC 2021


This enhancement adds the String property outputFileProperty() to the JobSettings class.
The value should be a string that references a local file encoded as a URL.
If this is non-null and set to a location that the user has permission to write to,
then the printer output will be spooled there instead of the printer, so long as the platform printing system supports this.
The user can of course also set a print-to-file destination in the platform printer dialogs which may over-ride what the application set. But now the application can also see what it was set to, and cancel or alter it if necessary.

A simple manual test is provided, manual mainly because the few real printing functional tests are all manual as they are only useful if run with a printer configured.

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

Commit messages:
 - 8223717: javafx printing: Support Specifying Print to File in the API
 - -8223717: javafx printing: Support Specifying Print to File in the API

Changes: https://git.openjdk.java.net/jfx/pull/543/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=543&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8223717
  Stats: 303 lines in 3 files changed: 301 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jfx/pull/543.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/543/head:pull/543

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


More information about the openjfx-dev mailing list