Unplanned
Last Updated: 22 Jan 2021 09:00 by ADMIN
Steven
Created on: 22 Jan 2021 08:54
Category: WordsProcessing
Type: Bug Report
1
WordsProcessing: Text watermark is incorrectly positioned when its width is bigger than the page width

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;
            }
        }
    }
}

0 comments