I need help rating printing. in fact I would like to print all the contents of my tableview but the following code that I made prints that the data that appeared on the screen the others below do not appear.
printTestButton.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent e){
Printer printer = Printer.getDefaultPrinter();
Stage dialogStage = new Stage(StageStyle.DECORATED);
PrinterJob job = PrinterJob.createPrinterJob(printer);
if (job != null) {
boolean showDialog =job.showPrintDialog(printTestButton.getScene().getWindow());
// boolean showDialog = job.showPageSetupDialog(dialogStage);
if (showDialog) {
tableview.setScaleX(0.50);
tableview.setScaleY(0.60);
tableview.setTranslateX(-210);
tableview.setTranslateY(-80);
boolean success = job.printPage(tableview);
if (success) {
job.endJob();
}
tableview.setTranslateX(0);
tableview.setTranslateY(0);
tableview.setScaleX(1.0);
tableview.setScaleY(1.0);
}
}
}
});