Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Force JavaFX Printer to Print HTML in Color #1248

Open
Vzor- opened this issue Apr 3, 2024 · 5 comments
Open

Cannot Force JavaFX Printer to Print HTML in Color #1248

Vzor- opened this issue Apr 3, 2024 · 5 comments
Assignees
Milestone

Comments

@Vzor-
Copy link
Contributor

Vzor- commented Apr 3, 2024

System: Windows 10

While testing #1247, I found that a printer which had been set to 'Black & White' in the device driver could not be told to print in color when printing from HTML. This JavaFX behavior is inconsistent with AWT printing, such as PDF/Image.

To reproduce:

  • Set up PDFCreator, or any printer with the Preferences>Paper/Quality>Color setting.
    Note: 'Microsoft Print to PDF' does not have the color setting, so it will not work in this test.
  • Set color to 'Black & White'
  • Start QZ tray
  • In sample.html, select pixel print and change 'Color Type' to Color
  • Select 'Print HTML'
@Vzor- Vzor- self-assigned this Apr 3, 2024
@Vzor-
Copy link
Contributor Author

Vzor- commented Apr 3, 2024

The issue seems to stem from this line
https://github.com/openjdk/jfx/blob/master/modules/javafx.graphics/src/main/java/javafx/print/JobSettings.java#L910
When the printer is set to 'Black & White', 'Color' is not considered to be supported.

@tresf
Copy link
Contributor

tresf commented Apr 11, 2024

Thanks for documenting this @Vzor-. Can you provide a small reproducible example to provide to Gluon for an upstream bug report?

@tresf tresf added the bug label Apr 11, 2024
@tresf tresf added this to the 2.2.5 milestone Apr 11, 2024
@tresf tresf changed the title Cannot Force Printer to Print HTML in Color Cannot Force JavaFX Printer to Print HTML in Color Apr 15, 2024
@Vzor-
Copy link
Contributor Author

Vzor- commented Apr 20, 2024

Thanks for documenting this @Vzor-. Can you provide a small reproducible example to provide to Gluon for an upstream bug report?

https://gist.github.com/Vzor-/b221e53911b2607919f68ac9d5e850ab

@tresf
Copy link
Contributor

tresf commented Apr 21, 2024

Thanks! Upstream bug report filed SUPQZ-21.

@tresf
Copy link
Contributor

tresf commented Apr 24, 2024

OpenJDK bug report: https://bugs.openjdk.org/browse/JDK-8143603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants