JavaFX convert WritableImage to Image
Use:
ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
ImageIO.write( SwingFXUtils.fromFXImage( wim, null ), "png", byteOutput );
com.itextpdf.text.Image graph;
graph = com.itextpdf.text.Image.getInstance( byteOutput.toByteArray() );