Export Stage into PDF
问题 IS there any way to export Stage or some other component like BorderPane with visual components into PDF file? I want when I click a button to export the component into PDF file? IS there any example? 回答1: you can send a node to a printer and save it as pdf with a virtual printer public class PrinterNodetExample extends Application { @Override public void start(Stage primaryStage) { Button btn = new Button(); StackPane root = new StackPane(); root.getChildren().add(btn); Scene scene = new