Pdf - Javafx

For multi-page viewing, combine this with a ScrollPane and VBox . You can also add zoom, rotation, and page navigation.

// Show the Stage primaryStage.show();

WritableImage snapshot = chart.snapshot(new SnapshotParameters(), null); BufferedImage bufferedImage = SwingFXUtils.fromFXImage(snapshot, null); // Then use iText or PDFBox to add this image to PDF javafx pdf

WritableImage snapshot = node.snapshot(new SnapshotParameters(), null); BufferedImage bufferedImage = SwingFXUtils.fromFXImage(snapshot, null); // Now add bufferedImage to PDF document For multi-page viewing, combine this with a ScrollPane

// Add the WebView to the StackPane root.getChildren().add(webView); For multi-page viewing