4

I'm using ITextRenderer to generate HTML to PDF file in mine Java App. Its works well and all but we spotted a problem in some of our PDF's. I've found just one reference in the web and also here at stack (itext-xmlworkerhelper-ignores-value-attribute-of-li-tag)

Does anyone can give a help? The problem is exactly the same as in the provided link.

I'm willing to change the API to make that work if someone suggests another one that is for sure to work...

Thanks!

Here goes the code for generating it:

    org.xhtmlrenderer.pdf.ITextRenderer renderer = new org.xhtmlrenderer.pdf.ITextRenderer();
    renderer.setDocumentFromString(strHhtml);
    renderer.layout();
    renderer.createPDF(out);
    renderer.finishPDF();

Where strHtml is the html content:

<ol style="list-style-type: lower-alpha">
     <li>aaaa</li>
     <li>bbbbbbb</li>
</ol>
<p style="margin-left: 42.55pt"><strong>Note:</strong> simple paragraph</p>
<ol style="list-style-type: lower-alpha">
     <li value="3">ccccc</li>
     <li value="4">bbbbbb</li>
</ol>
Community
  • 1
  • 1
ZehT
  • 41
  • 2
  • Pease provide code example and not just a link. It is much better then changing page and not being sure every point is equal to your situation – RPresle Oct 29 '15 at 13:55
  • Also: the question is tagged a itext and as wkhtmltopdf, but it's not an iText question, nor a wkhtmltopdf question. You are using Flying Saucer, a third party project that is *using* iText but that is not endorsed (nor supported) by iText Group. I'd appreciate it if you removed the itext tag. – Bruno Lowagie Oct 29 '15 at 16:08

0 Answers0