ADDITIONAL SYSTEM INFORMATION :
any/all
A DESCRIPTION OF THE PROBLEM :
We are trying to print a JavaFX Node with a good resolution and we found out that the JavaFX prints with a poor resolution(in Mac and Windows).
More information:
https://github.com/javafxports/openjdk-jfx/issues/379
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
By printing the current scene/JavaFX node using the provided JavaFX functionality(PrinterJob)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Good printing quality
ACTUAL -
Poor quality
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.print.PrinterJob;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class PrintTest extends Application {
public static void print(final Node node) {
PrinterJob job = PrinterJob.createPrinterJob();
job.showPrintDialog(node.getScene().getWindow());
boolean success = job.printPage(node);
if (success) {
job.endJob();
}
}
@Override
public void start(Stage primaryStage) throws Exception {
Button print = new Button("Print");
HBox hBox = new HBox(print);
print.setOnAction(event -> PrintTest.print(hBox));
primaryStage.setScene(new Scene(hBox));
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
private void printNode(Node node, Graphics g, int w, int h) {
PrismPrintGraphics ppg =
new PrismPrintGraphics((Graphics2D) g, w, h);
//++++++++++++START
((com.sun.javafx.geom.transform.Affine2D)ppg.getTransformNoClone()).scale(1.0001, 1.0001);
//++++++++++++END
NGNode pgNode = node.impl_getPeer();
boolean errored = false;
FREQUENCY : always
any/all
A DESCRIPTION OF THE PROBLEM :
We are trying to print a JavaFX Node with a good resolution and we found out that the JavaFX prints with a poor resolution(in Mac and Windows).
More information:
https://github.com/javafxports/openjdk-jfx/issues/379
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
By printing the current scene/JavaFX node using the provided JavaFX functionality(PrinterJob)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Good printing quality
ACTUAL -
Poor quality
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.print.PrinterJob;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class PrintTest extends Application {
public static void print(final Node node) {
PrinterJob job = PrinterJob.createPrinterJob();
job.showPrintDialog(node.getScene().getWindow());
boolean success = job.printPage(node);
if (success) {
job.endJob();
}
}
@Override
public void start(Stage primaryStage) throws Exception {
Button print = new Button("Print");
HBox hBox = new HBox(print);
print.setOnAction(event -> PrintTest.print(hBox));
primaryStage.setScene(new Scene(hBox));
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
private void printNode(Node node, Graphics g, int w, int h) {
PrismPrintGraphics ppg =
new PrismPrintGraphics((Graphics2D) g, w, h);
//++++++++++++START
((com.sun.javafx.geom.transform.Affine2D)ppg.getTransformNoClone()).scale(1.0001, 1.0001);
//++++++++++++END
NGNode pgNode = node.impl_getPeer();
boolean errored = false;
FREQUENCY : always
- duplicates
-
JDK-8166194 JavaFX: poor printing quality for Region nodes
-
- Resolved
-
- relates to
-
JDK-8166194 JavaFX: poor printing quality for Region nodes
-
- Resolved
-