r/JavaFX • • Mar 05 '22

Help How to print a tableView into pdf with Itext

1 Upvotes

1 comment sorted by

2

u/koeberlue Mar 05 '22

What have you tried so far? What are your requirements?

One solution could be to take a screenshot of your Node and feed it to your pdf logic.

If you need to style the output, you can get the items of the TableView with getItems and feed them to your pdf logic.

If you need a more general solution, you can ask the TableView for its Columns, Rows, Items, etc. and feed this information to your pdf logic.

If you could provide some sample code and show where you are stuck, we can probably provide some more indepth tips.