I am re-writing the lib at the moment, it was freezing the b4j prog, so I now run the print routine on a separate thread.
I can give you the source of the lib - if you know java its easy to add the bits you need. At present it just handles textareas, but has the logic in it to recognize most javafx items.
I have attached the lib to this post - the lib isn't finished so cannot as yet go into the library forum.
This is a taster if you like.