This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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???
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
At any given point in time the chart is static :-) You should be able to draw it onto a given Graphics2D object, no?