What I want to do is take a screenshot of the scene, I achieved this with the following code
WritableImage snapshot = stage.getScene().snapshot(null);
File file = new File("src//HE//Utilidades//Imagenes//consul.png");
try {
ImageIO.write(SwingFXUtils.fromFXImage(snapshot, null), "png", file);
//this is for open the screenshot
Desktop dt = Desktop.getDesktop();
dt.open(file);
} catch (IOException e) {
e.printStackTrace();
}
The screenshot is perfect the problem I have is with the quality of the screenshot , which i dont know of what dependents , I try to make the scene bigger but the quality of dpi remains the same (70) creating a very unpleasant image, i'm looking a way to improve the dpi of the screenshot at least 300dpi for printing