When a watermark needs more space than the available on the page, it should be resized. At this point, part of its content can be cut off as it falls outside of the page bounds.
Workaround: Decrease the size of the watermark prior to exporting it to PDF:
foreach (var section in this.document.Sections)
{
Header header = section.Headers.Default;
if (header != null)
{
foreach (Watermark watermark in header.Watermarks)
{
if (watermark.TextSettings != null && watermark.TextSettings.Width > section.PageSize.Width)
{
watermark.TextSettings.Width = section.PageSize.Width;
}
}
}
}
The missing feature leads to this unwanted behavior:
As a workaround, you need to apply a custom style (with the desired run properties) and apply it to the content control.
When exporting to a PDF file, a document with a header containing a watermark, set by a shape, the rest of the header content is skipped and the header is exported with default margin values.
A possible workaround could be to set the watermark as an image.
Absolute positioning of images, defined in the class stylesheet, is not respected.
According to the RTF specification: The valid values for the "\ls" index are from 1 to 2000.
They are currently exported from zero or "\ls0".
An incorrect file is produced when merging a stream more than 40 times.
Workaround: A possible workaround could be to merge up to 40 times in one file, then continue merging in a new one, and finally merge the newly generated documents.
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);
}
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}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:
When the data is set as double or float the Numeric formatting of the MergeField is not respected.
When the following merge field:
MERGEFIELD BAL \# ###,0.00
is populated with 5.70F or 5.70D the result is 5.7 instead of 5.70.