Content is moved from the second page to the first after applying styling to the footer and exporting to PDF format
The issue is reproducible only in a specific setup with a specific document. It is related to the calculations of the line spacing when the table row should be split between two pages.
Workaround: Change the line spacing:
foreach (var paragraph in this.document.EnumerateChildrenOfType<Paragraph>())
{
paragraph.Properties.LineSpacingType.LocalValue = HeightType.Auto;
paragraph.Properties.LineSpacing.LocalValue = 1;
}
This is caused by hasSize field in ShapeBase class which is set when decoding the image size. However, when SetWidth and SetHeight methods are called before the size is initialized the value of hasSize is false which causes the issue. Workaround: Call the Size property getter before calling SetWidth/SetHeight method. See the code below: // This line workarounds the issue with SetWidth method which does not get the correct size when locking aspect ratio. Size size = imageInline.Image.Size; imageInline.Image.SetWidth(true, width);
Currently empty paragraphs are exported to HTML with one space inside. Such paragraphs are not rendered by the browser. Such paragraph should be exported to HTML with one non-breaking space (@nbsp;) inside to ensure that they are visible in the browser.
Workaround: manually add nbsp-s in all empty paragraphs:
paragraph.Inlines.AddRun("\u00a0");
Steps to reproduce:
- Create document with empty paragraphs:
var document = new RadFlowDocument();
Section section = document.Sections.AddSection();
section.Blocks.AddParagraph();
section.Blocks.AddParagraph();
section.Blocks.AddParagraph();
section.Blocks.AddParagraph().Inlines.AddRun("test");
- Export it to HTML.
- Load the HTML in a browser.
Expected: The word 'test' is preceded by 3 empty rows.
Actual: The word 'test' is on the first row.
<w:sdt>
<w:sdtPr>
<w:text w:multiLine="1"/>
</w:sdtPr>
<w:sdtContent>
<w:r>
<w:t>Line 1</w:t>
</w:r>
<w:r>
<w:br/>
</w:r>
<w:r>
<w:t>Line 2</w:t>
</w:r>
</w:sdtContent>
</w:sdt>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>.
List's top and bottom margins are not correctly exported.
Workaround: Apply TelerikNormal style to the 'ol' element.
When exporting a DOCX file to PDF format, the following error message occurs:
Hyperlinks with fragment identifiers are not resolved correctly.
Example:
https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/overview#key-features
InvalidOperationException when cloning a document containing fields spanning multiple paragraphs.
Workaround: instead of new paragraphs, use line breaks (Shift+Enter).
Replace cannot match whole word with special characters (e.g. "#", "@", "&") at the start/end.
Workaround (RegEx):
editor.ReplaceText(new Regex($"(?<=\\s|^|[\\c_]){placeholder}(?=\\s|$|[\\c_])"),"new content");
Import a document that contains a picture content control and the following error occurs:
Telerik.Windows.Documents.Flow.Model.Annotations.StructuredDocumentTags.Builders.SdtBuilderFailureException: 'Picture control cannot be used in selection that contains any non-image content, or more than a single image.'