I have table with only 3 rows and 5 columns, when printing it prints all 3 rows but only 3 columns. This is my code:
private void print(Node node)
Printer printer = Printer.getDefaultPrinter();
PageLayout pageLayout
= printer.createPageLayout(Paper.A4, PageOrientation.PORTRAIT,
Printer.MarginType.HARDWARE_MINIMUM);
PrinterJob job = PrinterJob.createPrinterJob();
if (job != null && job.showPrintDialog(node.getScene().getWindow())) {
boolean success = job.printPage(node);
if (success) {
job.endJob();
}
}
This is button:
printButton.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent event) {
print(tableView);
}
});
What should i do so i can see all columns? i'm using old hp laserjet professional p1102 printer.