You only can parse JSP as a HTML output!
So you have to save the jsp output let's say, to a byte array in memory or a
string orbject or maybe into database!
And then you can use HTMLWorker object to parse that HTML snippet and
produce the PDF!
Here is an example:
........
String html = <p>Who is your daddy?</p>
InputStream s = new ByteArrayInputStream(html.getBytes());
List<Element> footer = HTMLWorker.parseToList(new
InputStreamReader(s), new StyleSheet());
if(footer.size()>0) {
elements.addAll(footer);
}
//Add parsed template
if (elements.size() > 0) {
for (Element e : elements)
document.add(e);
}
Hope it will be helpfull!
Br
Rico
-----Original Message-----
From: vinay789 [mailto:[email protected]]
Sent: quarta-feira, 17 de Junho de 2009 14:21
To: [email protected]
Subject: [iText-questions] how to convert my jsp output as pdf through itext
Hi
I am very much thankful for regarding itext for converting jsp output as
pdf.
I am a new bie to java and also itext currently my problem is i am working
on java server pages and i want this jsp output as pdf output pls explain me
how to do with this itext as soon as possible.
Thanx in advance.
--
View this message in context:
http://www.nabble.com/how-to-convert-my-jsp-output-as-pdf-through-itext-tp24
073537p24073537.html
Sent from the iText - General mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/