Converting an HTML document with tables greater than 15 inches in width to a DOCX forces the tables to 15 inches. I’m using Aspose.Words for .NET version 22.1.0.
To do the conversion, I’m loading the html document, setting a page size for easier viewing, and saving as a docx:
Document docTest = new Document(“LargeTables.html”);
DocumentBuilder builder = new DocumentBuilder(docTest);
builder.PageSetup.PaperSize = PaperSize.Custom;
builder.PageSetup.PageWidth = ConvertUtil.InchToPoint(10);
builder.PageSetup.PageHeight = ConvertUtil.InchToPoint(20);
builder.PageSetup.Orientation = Orientation.Landscape;
docTest.Save(“LargeTables.docx”);
The page size changes are not needed to reproduce the issue. I have attached a zip which contains an input LageTables.html and the current output I’m getting LargeTables.docx:
LargeTables.zip (7.2 KB)