Hi guys,
i need help about printing some content loaded in a webview and at the same time getting the possibility to add the classic page number on footer like "Page x of y".
I searched on the web without find nothing.
Actually my code consists of the follow source:
public void print(final javafx.scene.Node node) {
Printer printer = Printer.getDefaultPrinter();
PrinterJob job = PrinterJob.createPrinterJob(printer);
job.getJobSettings().setPageLayout(pageLayout);
if (job != null) {
Window window = webviewDocument.getScene() != null ? webviewDocument.getScene().getWindow() : null;
if (job.showPrintDialog(window)) {
webviewDocument.getEngine().print(job);
job.endJob();
}
}
}
Any idea to do that? Someone can help me?
Thanx in advance