Search code examples
javapdfjavafxsavefilechooser

can I save an entire scrollpane as "pdf"?


I have been working on javafx and I want to save an entire scrollpane as "pdf". Is there a way I can do it without printjob?just a save button and it'll directly save the pane as pdf to directory using file chooser.


Solution

  • Yes, it is possible. You can use iText (and possibly instance of class Robot) for example. Use iText and instance of Class Robot if you want to save an image of the scroll pane to a pdf file, otherwise you can just use iText.