Java 当项目符号位于html中的多个位置时,如何使用itext api将项目符号从html生成为pdf
在动态地从HTML生成PDF时,我面临一个问题。这就像HTML中有一些要点在多个位置。HTML如下所示:Java 当项目符号位于html中的多个位置时,如何使用itext api将项目符号从html生成为pdf,java,itext,Java,Itext,在动态地从HTML生成PDF时,我面临一个问题。这就像HTML中有一些要点在多个位置。HTML如下所示: <p>In regard to a "zero lot line" situation, extreme care should be exercised in connection with:</p> <ul> `enter code here`<li> the right of legal ac
<p>In regard to a "zero lot line" situation, extreme care should be
exercised in connection with:</p>
<ul>
`enter code here`<li> the right of legal access to and from the property.
<li>the possible existence of encroachments of the sides of the buildings or
structures upon the common areas.</li>
</ul>
<p>In regard to a "zero lot line" situation, extreme care should be
exercised in connection with:</p>
<ul>
<li> the right of legal access to and from the property.
<li>the possible existence of encroachments of the sides of the buildings or
structures upon the common areas.</li>
</ul>
<p>In regard to a "zero lot line" situation, extreme care should be
exercised in connection with:</p>
<ul>
<li> the right of legal access to and from the property.
<li>the possible existence of encroachments of the sides of the buildings or
structures upon the common areas.</li>
</ul>
但通过这样做,它会在子弹部分之后修剪所有内容。它只打印子弹的第一个实例
请帮我做这个。是否有一种方法可以将多个部分存储在一个列表中,然后最终将完整的列表转换为PDF
提前谢谢
org.jsoup.nodes.Document doc = Jsoup.parse(htmlString);
Elements links = doc.select("ul li");
List list = new List(false, 20);
for (Element element : links) {
list.setListSymbol("\u2022");
list.add(element.text());
}
document.add(list);