Exporting to PDF of a table with a first cell having preferred width of 100% and a second cell having preferred width of auto will result in missing the second cell.
This is happening because the cell with preferred width 100% takes all the available width and all other columns are rendered with no available width which causes the height of the table to grow big. WORKAROUND: Either clear the cell PreferredWidth property or set it to value which is smaller than 100%.
When the table is nested in another table with fixed-width and the nested one has more than one cell in the row, where the one has a preferred width set to auto and the other has content that split on more than one row, then the first cell is exported with a wrong width.
PdfFormatProvider: Table cells are exported with the wrong width when the table is nested in another table and the cells of the nested one have a preferred width set to 100%.
When the nested table has Width set in %, the value is calculated relative to the page, instead of relative to the parent table.
Workaround: Clear the cell PreferredWidth property.
The Indent property of Table is not respected by PdfFormatProvider.
This is done due to wrong column widths weights calculations.
When the table width is set to fixed with the value of zero:
<w:tblW w:w="0" w:type="dxa"/>
Importing HTML tables with mixed inline width styles and auto-width cells, then exporting to PDF, can produce missing/narrow columns or wrapped labels.
For example, a 4-cell row with td style="width: 60%" and td style="width: 40%" causes the unlabeled cells to collapse in PDF output, even though the HTML renders correctly in browser.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table>
<tr>
<td align="right">Customer:</td>
<td style="width: 60%;">Angel Popov</td>
<td align="right">Date:</td>
<td style="width: 40%;">4/4/2004</td>
</tr>
</table>
</body>
</html>Expected: all cells keep visible widths and text stays on one line.
Actual: auto columns shrink too much or disappear during PDF export after HTML import.
When table cell preferred width is smaller than the first word in the cell the actual exported width should fit the word width when exporting to PDF. Currently in such case the word is split into two lines. The width has to be equal to the word width so the word stays on a single row.
Hello
Calling MailMerge on a document with a nested repeating group throws NullReferenceException when a merged value contains a line terminator.
All of the following are required to reproduce the crash:
I have attached a minimal repro demonstrating the bug.
HtmlFormatProvider: Styles are not correctly preserved when a <b> tag is applied to the same styled element.
Workaround: Apply bold through CSS instead of using <b>.
When there is an abstractNum defined with the same abstractNumId in word\glossary\numbering.xml and in the word\numbering.xml, a "System.ArgumentException: An item with the same key has already been added." exception is thrown.
In other cases, the import overwrites the styles from the main document part with the ones defined in the glossary or fails to import different parts of the content.
Workaround: Delete the glossary files:
string path = "File.docx";
using (Stream str = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
using (ZipArchive archive = ZipArchive.Update(str, null))
{
foreach (ZipArchiveEntry entry in archive.Entries.ToList())
{
if (entry.FullName.Contains("glossary/"))
{
entry.Delete();
}
}
}
DocxFormatProvider provider = new DocxFormatProvider();
RadFlowDocument flowDocument = provider.Import(str, null);
}
LineInfo objects are not cleared when there are tables in the document being exported to PDF which leads to OutOfMemoryException.