The table is cut off when its width is larger than the default page width.
Workaround:
var htmlProvider = new HtmlFormatProvider();
var document = htmlProvider.Import(File.ReadAllText(@"..\..\HTMLPage1.html"));
var tables = document.EnumerateChildrenOfType<Table>();
double maxWidth = document.Sections.FirstOrDefault().PageSize.Width;
foreach (var item in tables)
{
if (item.PreferredWidth.Type == Telerik.Windows.Documents.Flow.Model.Styles.TableWidthUnitType.Fixed)
{
maxWidth = Math.Max(maxWidth, (item.PreferredWidth.Value + 100));
}
}
foreach (var item in document.Sections)
{
item.PageSize = new System.Windows.Size(maxWidth, item.PageSize.Height);
}
var pdfProvider = new PdfFormatProvider();
File.WriteAllBytes(@"..\..\result.pdf", pdfProvider.Export(document));