The following html table is rendered with a 0 width, causing the text to be wrapped, it should span the whole width of the page. The zip contains the sample html, the expected (from Chrome) and actual image. Sample code below the html.
AsposeFixedTable.zip (93.8 KB)
<table style=“border: solid red;” >
<tr>
<td>
<table style=“border: solid blue; table-layout: fixed;” >
<tr>
<td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam faucibus urna non commodo rhoncus.
</td>
</tr>
</table>
</td>
</tr>
</table>
Rendering code (using Aspose.HTML 24.7.0):
HTMLDocument doc = new HTMLDocument(“<table style=\“border: solid red;\” ><tr><td><table style=\“border: solid blue; table-layout: fixed;\” ><tr><td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam faucibus urna non commodo rhoncus.</td></tr></table></td></tr></table>”, “.”);
HtmlRenderer renderer = new HtmlRenderer();
ImageRenderingOptions options = new ImageRenderingOptions(ImageFormat.Jpeg);
MemoryStream screenshotStream = new MemoryStream();
ImageDevice idv = new ImageDevice(options, screenshotStream);
doc.RenderTo(idv);
File.WriteAllBytes(Path.ChangeExtension(Path.GetRandomFileName(), “.jpg”), screenshotStream.ToArray());