Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML report generation

 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No i am not using this for any other purpose
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic