When converting HTML to Word using Aspose.Words, images inside table cells overflow or fail to resize dynamically. I expect the images to fit within the cell without affecting the table layout.
HTML Example:
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
img {
max-width: 100%;
height: auto;
}
td {
overflow-wrap: anywhere;
}
pre {
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: anywhere;
}
</style>
</head>
<body>
<div>
<h2>Stories</h2>
<table style="border-collapse: collapse; width: 100%; table-layout: fixed; border: 1px solid #cccccc;">
<thead>
<tr>
<th style="border: 1px solid #cccccc; padding: 10px; text-align: left; font-weight: bold;">
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border: 1px solid #cccccc; padding: 10px; word-wrap: break-word; overflow-wrap: break-word;">
<div style="">
<img src="https://arn-dev-resources.s3.ap-south-1.amazonaws.com/b83c0874-1705-3bd5-834a-e792a3f176b8/10003/113/images/arn_file_2024-11-26-21-18-45-813.jpeg" alt="Example Image" style="max-width: 100%; height: auto;" />
</div>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
attachement after conversion.
Environment Details:
- Aspose.Words version: 23.x.x
- Java version: OpenJDK 17
- OS: Windows 11