Hi,
In my popup windows, i have shown 3 charts.Now i want to export all charts to MSword after clicking a button.
Please suggest me how i achieve that.
i.e i want to save the all charts in the pop up windows into word format.
Please reply me as soon as possible.
Thanks
Chinmay
export jfree chart to MSWord
-
- Posts: 14
- Joined: Tue May 06, 2008 5:57 am
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Microsoft's DOC format is a proprietary format. RTF (Rich Text Format) is also a Microsoft proprietary format, but it is open in as much as the specification has been released. In both cases, the file formats only describe text or textural documents. Neither encode image data. What you need to do is use JFreeChart's built in functionality to export charts to PNG or JPEG which can be included/imported/referenced in a DOC or RTF file.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Well, not fully true: RTF *can* contain images - but it is a mess. An easy way to create RTF-documents is to use iText to build up your document and to include AWT-images in the document.
So:
(1) Create images from your charts
(2) Create the iText-document and insert the images there.
(3) Save the doc, and word should be able to pick it up.
The iText documentation contains all information needed to start with generating RTF documents.
So:
(1) Create images from your charts
(2) Create the iText-document and insert the images there.
(3) Save the doc, and word should be able to pick it up.
The iText documentation contains all information needed to start with generating RTF documents.