Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX printing

Does JavaFX 2.0 supports printing? I have a text area from which I take the text and then I want to print it, but it seems that there is not functionality for that. Of course, here I am talking about printing to a printer. :)

like image 378
Zookey Avatar asked Apr 08 '12 19:04

Zookey


1 Answers

not yet supported. As a workaround you can make screenshot and print using Java2d.

See

Copying the image of a ScatterChart to system clipboard in JavaFX 2.0

Printing a BufferedImage in Java

Update:

JavaFX8 (which will be included into upcoming JDK8 release) has printing support. See nice example here: http://java.dzone.com/articles/introduction-example-javafx-8

like image 52
Sergey Grinev Avatar answered Oct 23 '22 20:10

Sergey Grinev