What do you mean by "canvas"; do you mean an HTML 5 canvas? If yes, then you're talking about JavaScript, which is something that does not have very much to do with Java.
If Canvas refers to the AWT object, then it's probably easier to export its contents to an image, and then add the image to a PDF using a library such as iText.
What do you mean by "canvas"; do you mean an HTML 5 canvas? If yes, then you're talking about JavaScript, which is something that does not have very much to do with Java.
Thanks Jesper.
I am using Open GL libraries and from my Java code, I am referring to the Canvas, using the getCanvas() method. So basically my question is all about Java. And yes I did check out the iText library. Thou i'm still trying to use it..
Ulf Dittmer wrote:If Canvas refers to the AWT object, then it's probably easier to export its contents to an image, and then add the image to a PDF using a library such as iText.
Yes Ulf, its an AWT object, but it does have openGL libraries too. How could i export the contents to an image?
Ok here's the problem I am facing... my image is I need to export only the chart part of my image into PDF format.
I tried to this :
But my chart is dynamic. It refreshes every time I perform some mouse action.. So I don't want to explicitly specify my chart image. How do I go about it???