We load a html with aspose.word.Document and save the file as a PDF with aspose.word.Document.Save.
If the html file contains a “dived” table like this it is not converted to the pdf file
<table>
<tbody>
<tr>
<td class="line-content">
<span class="html-tag">
</span>
</td>
</tr>
<tr>
<td class="line-number" value="11"></td>
<td class="line-content">
<span class="html-tag"><table <span class="html-attribute-name">border</span>="<span class="html-attribute-value">1</span>" <span class="html-attribute-name">cellspacing</span>="<span class="html-attribute-value">0</span>" <span class="html-attribute-name">bgcolor</span>="<span class="html-attribute-value">#ffffff</span>"></span>
</td>
</tr>
<tr>
<td class="line-number" value="12"></td>
<td class="line-content">
<span class="html-tag"><font <span class="html-attribute-name">color</span>="<span class="html-attribute-value">#ff0000</span>" <span class="html-attribute-name">size</span>="<span class="html-attribute-value">2</span>" <span class="html-attribute-name">face</span>="<span class="html-attribute-value">Arial</span>"></span><span class="html-tag"><caption></span>
</td>
</tr>
<tr>
<td class="line-number" value="13"></td>
<td class="line-content">
<span class="html-tag"><div <span class="html-attribute-name">align</span>="<span class="html-attribute-value">left</span>"></span>5 x 978-3-423-36288-7 Marie-France Hirigoyen - Die Masken der Niedertracht<span class="html-tag"></span>
</td>
</tr>
<tr>
<td class="line-number" value="14"></td>
<td class="line-content">
<span class="html-tag"></caption></span><span class="html-tag"></font></span>
</td>
</tr>
<tr><td class="line-number" value="15"></td><td class="line-content"><span class="html-tag">
<tbody>
</span>
</td></tr>
<tr>
<td class="line-number" value="16"></td>
<td class="line-content">
<span class="html-tag"><font <span class="html-attribute-name">color</span>="<span class="html-attribute-value">#ff0000</span>"></span><span class="html-tag"></font></span>
</td>
</tr>
<tr><td class="line-number" value="17"></td><td class="line-content"><span class="html-tag">
</tbody></span>
</td></tr>
<tr><td class="line-number" value="18"></td><td class="line-content"><span class="html-tag">
</table></span>
</td></tr><tr>
<td class="line-number" value="19"></td>
<td class="line-content">
<span class="html-tag">
</span>
</td>
</tr></tbody></table>
This is the code and our test html is attached.
var options = new Aspose.Words.LoadOptions();
options.LoadFormat = Aspose.Words.LoadFormat.Html;
var document = new Aspose.Words.Document("test.html", options);
Aspose.Words.Saving.PdfSaveOptions saveOptions = new Aspose.Words.Saving.PdfSaveOptions();
document.Save("test.pdf", saveOptions);