File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes HTML report generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "HTML report generation" Watch "HTML report generation" New topic
Author

HTML report generation

akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
I am using JFreeChart to generate some reports in my panel. Say there are four pie charts that will be displayed in my panel. I need to export these charts to pdf and html reports. I succeeded with iText for pdf report, but HTML is still bugging. Anybody please hep.. any code snippet would be very helpful.. I need to generate a HTML doc with my pie charts within.....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42950
    
  70
If you got it to create PDFs with iText, HTML should be easy, since iText also supports HTML, no? Or is iText's HTML support not on a par with its PDF support?
akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
for pdf there was PDFTemplate class that helped me in exporting the chart.. But the HTML stuff doesnt seem to have an equal counterpart class to do so. I could find only methods that would allow me to add paragraphs and tables.....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42950
    
  70
I see. Anything involving PdfContentByte would not apply to HTML, obviously.

You can add images using Document.add(com.lowagie.text.Image). That works for all output formats. Or are you using PdfTemplate for other purposes as well?
akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
yeah.. i was thinking if i could find something similar that would accept a JFreeChart and give me a convenient return type... I dont know if JFreChart can be taken directly to am Image object.. i am having multiple charts in a single panel
akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
No i am not using this for any other purpose
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML report generation