itext XMLWorkerHelper ignores value attribute of <

2019-05-23 07:09发布

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.

0条回答
登录 后发表回答