Working with JAVA spire.doc everything works fine and paragraph's `appendHTML(html)` appends when html is
- Code: Select all
<table style="font-size: 11pt; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 16.6118%;">A</td>
<td style="width: 16.6118%;"> </td>
<td style="width: 33.3882%;"> </td>
<td style="width: 33.3882%;"> </td>
</tr>
<tr>
<td style="width: 16.6118%;"> </td>
<td style="width: 16.6118%;"> </td>
<td style="width: 33.3882%;"> </td>
<td style="width: 33.3882%;"> </td>
</tr>
<tr>
<td style="width: 16.6118%;"> </td>
<td style="width: 16.6118%;"> </td>
<td style="width: 33.3882%;"> </td>
<td style="width: 33.3882%;"> </td>
</tr>
</tbody>
</table>
But when we got html as follows, where table width is not 100%, it throws exception
- Code: Select all
Caused by: com.spire.doc.packages.sprylt: Unknown char: .
at com.spire.doc.packages.sprnas.spr┩□(DoubleParser.java:258)
at com.spire.doc.packages.sprnas.spr↡▁(DoubleParser.java:41)
at com.spire.doc.packages.sprmip.spr↡▁(SingleParser.java:41)
at com.spire.doc.packages.sprdqt.spr↡▁(SingleExtensions.java:125)
at com.spire.doc.packages.sprwov.spr‡℠(Convert.java:1418)
at com.spire.doc.packages.sprwov.spr▊▥(Convert.java:1412)
at com.spire.doc.packages.sprjgaa.spr∭┝—(Unknown Source)
at com.spire.doc.packages.sprjgaa.spr▆┝—(Unknown Source)
at com.spire.doc.packages.sprjgaa.spr©┝—(Unknown Source)
at com.spire.doc.packages.sprjgaa.spr◑┝—(Unknown Source)
at com.spire.doc.packages.sprjgaa.spr⅞┤—(Unknown Source)
at com.spire.doc.packages.sprjgaa.spr▌‘(Unknown Source)
at com.spire.doc.packages.sprjgaa.spr═‘(Unknown Source)
at com.spire.doc.documents.Paragraph.appendHTML(Unknown Source)
- Code: Select all
<table style="font-size: 11pt; width: 74.8768%; height: 124px;" border="1">
<tbody>
<tr>
<td style="width: 16.6118%;">A</td>
<td style="width: 16.6118%;"> </td>
<td style="width: 33.3882%;"> </td>
<td style="width: 33.3882%;"> </td>
</tr>
<tr>
<td style="width: 16.6118%;"> </td>
<td style="width: 16.6118%;"> </td>
<td style="width: 33.3882%;"> </td>
<td style="width: 33.3882%;"> </td>
</tr>
<tr>
<td style="width: 16.6118%;"> </td>
<td style="width: 16.6118%;"> </td>
<td style="width: 33.3882%;"> </td>
<td style="width: 33.3882%;"> </td>
</tr>
</tbody>
</table>
HTML we received from another module, so we are not able to modify it and have no control on the code. It is obtained from frontend UI wysiwyg editor.
Code is:
- Code: Select all
Section tempSection = document.addSection();
tempSection.addParagraph().appendHTML(htmlString);
Would you help pls? Spire.doc is of version 5.4.10