I try to print a WebView with the following code:
private void handlePrintButtonAction(ActionEvent event) {
PrinterJob job = PrinterJob.createPrinterJob();
if (job != null) {
if (job.showPageSetupDialog(null)) {
webView.getEngine().print(job);
job.endJob();
}
}
}
When I cancel the page setup dialog the page is still printed which, according to the documentation, should not be the case.
private void handlePrintButtonAction(ActionEvent event) {
PrinterJob job = PrinterJob.createPrinterJob();
if (job != null) {
if (job.showPageSetupDialog(null)) {
webView.getEngine().print(job);
job.endJob();
}
}
}
When I cancel the page setup dialog the page is still printed which, according to the documentation, should not be the case.