We are converting html to pdf and these html will be generated from rich text editor.
Please suggest a fix where we could identify any table which is getting cut or it’s width is more than page and adjust it.
Below is the code we are using to convert html to pdf.
using (var memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(File.ReadAllText(@“C:\Users\msingh02\Desktop\wideImageIssueWithTable.html”))))
Aspose.Words.Document docw = new Aspose.Words.Document(memoryStream, new LoadOptions(LoadFormat.Html, null, null));
foreach (Aspose.Words.Section sec in docw.Sections)
Aspose.Words.PageSetup ps = sec.PageSetup;
// 1 inch equals 72 points
ps.TopMargin = 0;
ps.RightMargin = 0;
ps.BottomMargin = 0;
ps.LeftMargin = 0;
ps.PageWidth = Aspose.Pdf.Generator.PageSize.A4Width;
ps.PageHeight = Aspose.Pdf.Generator.PageSize.A4Height;
Table width issue.zip (55.0 KB)