Importing html image with no source and then exporting it to pdf causes an exception, instead of omitting the faulty image.
Such images can be stripped using the following workaround:
List<ImageInline> images = this.document.EnumerateChildrenOfType<ImageInline>().ToList();
foreach (var image in images) { if (image.Image.ImageSource == null) { image.Paragraph.Inlines.Remove(image); } }
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));
<w:tblCellMar>
<w:top w:w="2880" w:type="dxa"/>
<w:bottom w:w="2880" w:type="dxa"/>
</w:tblCellMar>
<w:tblCellMar>
<w:top w:w="2880" w:type="dxa"/>
<w:left w:w="0" w:type="dxa"/>
<w:right w:w="0" w:type="dxa"/>
<w:bottom w:w="2880" w:type="dxa"/>
</w:tblCellMar>
Hello,
we are describing a reproducable problem (WordProcessing demo page), where DOCX footnotes are not imported as expected.
Current behaviour:
Upon converting a custom DOCX (including footnotes) into a DOCX again, using the WordProcessing demo, the converted document does no longer contain any footnotes.
Expected behaviour:
The downloaded DOCX should still contain all footnotes from the uploaded DOCX after converting it.
How to reproduce:
Is there anything that can be done as a workaround until this has been resolved?
Thank you in advance.
Kind Regards,
Dominik
The content controls ID's must be set automatically when once clones or inserts an SDT.
Workaround: Manually set the ID
SdtRangeStart start = grpContentControls.Where(c => Convert.ToString(c.SdtProperties.Tag) == "purchlastname").First();
var properties = new SdtProperties(start.SdtProperties);
properties.ID = 123456;
var currentItem = editor.InsertStructuredDocumentTag(properties);
The tab stop line wrongly inherits its thickness from the previous table cell`s border.