itext XMLWorkerHelper ignores value attribute of <li> tag

匿名 (未验证) 提交于 2019-12-03 07:50:05

问题:

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!