brijlata purohit

Greenhorn
+ Follow
since Sep 13, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by brijlata purohit

But i am using in jsp page,html output of jsp page is converted into pdf ,using classes and methods of flying saucer and itext open apis for html to pdf conversion.

page import="
javax.xml.parsers.DocumentBuilder,
javax.xml.parsers.DocumentBuilderFactory,
org.xml.sax.InputSource,
com.lowagie.text.DocumentException,
org.xhtmlrenderer.pdf.ITextRenderer"
.
.
....

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(builder.parse(new InputSource(new StringReader(buf.toString()))), null);
.
.
.....
OutputStream os = new FileOutputStream(outputFile);
renderer.layout();
renderer.createPDF(os);
i m using flying saucer with itext but it is not identifying   while converting from html to pdf ,any idea ! please suggest! thanks in advance..
I am using flying saucer for converting html into pdf and for that I used

StringBuffer buf = new StringBuffer();
buf.append("<html xmlns='http://www.w3.org/1999/xhtml'>");
buf.append("<head>");
buf.append("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />");
buf.append("<link rel='stylesheet' type='text/css' href='css/style_pdf1.css' title='style'");
buf.append(" media='print' />");
buf.append("</head>");
buf.append("<body>");
.....
....

and then

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(builder.parse(new InputSource(new StringReader(buf.toString()))), null);
String outputFile = "ppt.pdf";
OutputStream os = new FileOutputStream(outputFile);
renderer.layout();
renderer.createPDF(os);
os.close();

but
flying saucer not converting cellspacing html property properly into pdf ,any suggestion please !