In the document produced by the mail merge, the date time and numeric formatting applied are not respected and the value is in its default format.
Table with specified width in inches is not correctly exported when the size is set in inches (this is done in the imported HTML)
Workaround: set the table size in the code and remove the style.
foreach (Table table in document2.EnumerateChildrenOfType<Table>())Add support for Upper and Lower field switches More info is available here: Formatting fields with switches
Here are the switches that should be supported:
Add support for all number switches. More info is available here: Formatting fields with switches
Here are the switches that should be supported:
Amount \# $,0.00: {MERGEFIELD FirstAmount \# $,0.00}When we have Document properties set (no Section properties set) and the \sectd control word is missing the Document properties are not respected.
From the RTF Specification: When we have Section properties set the \sectd resets the values to that specified by the Document properties. But when we don't have Section properties set and the \sectd is missing we should inherit the values specified by the Document properties
The alternative text allows setting a description of the information contained inside the table and is useful for people who may not be able to see the content.
margin-top margin-right margin-bottom margin-left
Background properties do not inherit, but the parent element's background will shine through by default because of the initial 'transparent' value on 'background-color'.
HTML content:
<div style="background-color: gray; color: red">
Text outside the list
<ul>
<li>
Text in the list
</li>
</ul>
</div>
The result when exported to DOCX/PDF:
Workaround: set the style directly to the <ul> element:
<div style="background-color: gray; color: red">
Text outside the list
<ul style="background-color: gray;">
<li>
Text in the list
</li>
</ul>
</div>
When exporting a document containing a FloatingImage in the header/footer the measurement of the header/footer height doesn't take into account the height of this image.
This leads to overlapping the page content with the image.
Workaround: Increase the Header (or Footer) top page margin by the height of the image:
foreach (Section section in this.document.Sections)
{
double floatingImageHeight = 0;
foreach (BlockBase block in section.Headers.Default.Blocks)
{
if (block is Paragraph paragraph)
{
FloatingImage floatingImage = (FloatingImage)paragraph.Inlines.FirstOrDefault(i => i is FloatingImage);
floatingImageHeight = floatingImage.Image.Height;
}
}
double left = section.PageMargins.Left;
double top = section.PageMargins.Top + floatingImageHeight;
double right = section.PageMargins.Right;
double bottom = section.PageMargins.Bottom;
section.PageMargins = new Telerik.Windows.Documents.Primitives.Padding(left, top, right, bottom);
}
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.
Text frames are paragraphs of text in a document which are positioned in a separate region or frame in the document and can be positioned with a specific size and position relative to non-frame paragraphs in the current document. More information about it is available in section 22.9.2.18 ST_XAlign (Horizontal Alignment Location) of Open Office XML.