Question

I'm using itext 5.4.5 with XMLWorker 5.4.5 to generate pdf from html that cames from ckEditor. Users can also paste some text from word documents and this results sometimes in something like this:

<ol>
   <li value="3">some text1</li>
</ol>
<div>lorem ipsum dolor</div>
<ol>
   <li value="100">some text2</li>
</ol>
<div>lorem ipsum dolor</div>
<ol>
   <li value="77">some text3</li>
</ol>

this results in ckEditor and in html as

   3. some text1    
lorem ipsum dolor    
   100. some text2    
lorem ipsum dolor
   77. some text3

But if itext convert this html to pdf, it ignores the value of li-tags and sets it to "1." and this results in something like

  1. some text1

lorem ipsum dolor

  1. some text2

lorem ipsum dolor

  1. some text3

Does somebody knows a way, make itext read and also use the numeric value of a li-tag?

Thanks in advance.

No correct solution

OTHER TIPS

Use "start" attribute of <ol> tag, like below:

<ol start="3">
  <li>some text1</li>
</ol>
<div>lorem ipsum dolor</div>
<ol start="100">
  <li>some text2</li>
</ol>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top