• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

flying saucer not identifying   of html

 
brijlata purohit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with JSP; I'll move it to a more appropriate forum.
 
brijlata purohit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic