Replies: 3 comments 2 replies
-
you can look at how the screenshot plugin creates a snapshot: If you want to export the image non-interactively it might be necessary to enforce a few render passes before taking the snapshot due to some outstanding issues with scene invalidation. |
Beta Was this translation helpful? Give feedback.
-
Thank you for a quick answer! I'll take a look at the code. |
Beta Was this translation helpful? Give feedback.
-
@wirew0rm I've updated the question. You mentioned "a few render passes". How can I do that without actually displaying a chart? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm generating a PDF file using the package
itextpdf
in Java. I'd like to add anXYChart
image to that PDF file.Is there a way to export
XYChart
into a JPEG or PNG file? So I could add that image to my PDF?UPDATE:
I tried using the method
XYChart.snapshot()
, but it doesn't seem to export any image.Here is the code that I run:
When I run this code, I can see the application window with the chart. Here is its screenshot:
However, when I look at the created file "chart.png", it's completely empty: chart.png
Do you have any suggestions on what might be wrong?
This is my pom file if you need it:
Alex
Beta Was this translation helpful? Give feedback.
All reactions