Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i generate PDF from JSF

 
Aiswarya Geidth
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am new to JSF. I want to generate PDF from JSF. I have data in h:dataTable in JSF and i want to add this data to the PDF Document table.
Please can any one help me.



Thanks in advance
 
Rok Koncina
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at itext.
 
Aiswarya Geidth
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for response.

I was seen that iText and i am able to implement that one in SERVLET and in JSP but not in JSF.
So, i want to generate PDF on fly in JSF when clicking on a link.


Thanks
 
Tim Moores
Bartender
Posts: 2951
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For tabular data I'd check out DisplayTag: http://www.displaytag.org/
 
Rok Koncina
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I gave you a fast answer that wasn't complete.
With Jboss Seam you can create a pdf in the similar way you create classic jsf page.
http://docs.jboss.com/seam/latest/reference/en-US/html/itext.html

You can fill this "page" with data the same way you fill the displayed jsf page. Than all you need is a link to this page and you'll get a pdf.
 
Aiswarya Geidth
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the solutions.

I got solution for my problem. In normal java bean i used response.setHeader using FacesContext.



Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic