itext 5.5.11强制转换异常[com.itextpdf.text.ZapfDingbatsList无法强制转换为com.itextpdf.text.ListItem]

时间:2017-07-31 11:02:54

标签: itext xmlworker

我已经创建了一个将html字符串解析为pdf的应用程序。现在它的工作但显示异常。我无法找到实际问题。

XMLWorkerHelper.getInstance()。parseXHtml(作家,                             document,new ByteArrayInputStream(parserXHtml(page.getPageContent())。getBytes()));

public String parserXHtml(String html) {
    org.jsoup.nodes.Document document = Jsoup.parseBodyFragment(html);
    document.outputSettings().syntax(org.jsoup.nodes.Document.OutputSettings.Syntax.xml);
    //document.outputSettings().charset("UTF-8");
    return document.html();
}

以上代码用于将html字符串粘贴到pdf

错误屏幕截图

error screen shot

示例html内容

<p>This section includes assumptions that the BCP is written under.&nbsp; Some examples are below.<\/p><p><strong> General </strong><\/p><ul> <li>WolfPAC Organization Name has suffered a significant interruption of back office operations at one or more of its facilities<\/li> <li>None or not all of the branches have been affected by the same incident.<\/li> <li>Key personnel, or their designated back-ups identified in the plan, are available following a disaster.<\/li> <li>Critical employees, as listed in the individual Business Unit BCP\/BIA Worksheets and on the IT Recovery Summary, will be relocated to a contingency site.&nbsp;<\/li> <li>Connections to the core system will be made from the Contingency Sites.<\/li> <li>The contingency site(s) is\/are available and prepared according to&nbsp;the institution&rsquo;s specifications.<\/li>\t<li>Connectivity to all utilities is operational at the contingency site.<\/li>\t<li>Connectivity will be made to all branches from the contingency site.<\/li>\t<li>The network will be recovered following a disaster affecting the main data center.<\/li>\t<li>All critical suppliers and vendors are available to support the institution.&nbsp; WolfPAC Organization Name has reviewed SLAs and Business Continuity Plans for all third party resources.&nbsp; Critical resources required for business operations are available from identified suppliers or off-site storage.&nbsp;<\/li>\t<li>The BCP Plan is not intended to provide a &ldquo;business as usual&rdquo; environment but will provide for continuity of daily operations of critical applications and business functions in a scaled back environment.<\/li>\t<li>Recovery expectations have been communicated and approved by managers and the Executive Management Team and reported to the Board of Directors.<\/li>\t<li>Procedures for back-up and off-site storage of computer media and manual files have been deemed sufficient by&nbsp;the IT Department, are kept current, and the data is readily available to the contingency sites.<\/li>\t<li>Proper cooperation and resources will be provided based upon the importance of the business function to support a timely recovery.<\/li>\t<li>Team Members have the ability to designate responsibilities to other members of their department who have the expertise to execute the task(s). However, team members will be held accountable for the responsibilities being completed.<\/li>\t<li>Expenses during a disaster will be recorded in a separate disaster ledger and reported as described in each section.<\/li>\t<li>Daily operational, off-line, and recovery procedures will not be documented in this Plan. It is recommended that each department maintain any procedures critical to daily operations. These procedures should be stored off-site in a secure location and on the network if it is being backed up.&nbsp;<\/li>\t<li>Maintenance of the plan must be performed on a continuing basis, as changes to the business requirements and technology must be reflected.<\/li>\t<li>Components of the plan must be tested periodically: at least twice per year is recommended.&nbsp; Test Objectives should vary from test to test to consider various areas of the institution.<\/li>\t<li>A copy of this plan will be provided to all of the Executive Management Team, leaders of each Business Continuity Disaster Team<\/li><\/ul><br\/>"

0 个答案:

没有答案