HtmlFormatProvider does not maintain all the whitespaces on import even though {style="white-space: pre;"} was set.
It should support {style="white-space: pre-wrap;"} as well.
It can eventually be extended to support all the property's values: normal|nowrap|pre|pre-line|pre-wrap|initial|inherit.
The mail merge should support conditional fields. Here is an example:
{ IF [Condition] [Display Result 1] [Display Result 2] }
The construct <link rel="stylesheet" href="main.min.css" /> doesn't raise the HtmlImportSettings.LoadFromUri event on import, as we currently require type="text\css" to be specified explicitly.
type attribute, but is actually now recommended practice.
Think of improving the message of the exception we throw if no data is loaded.
Workaround: set type explicitly:<link rel="stylesheet" type="text/css" href="main.min.css" />
private static void SplitDocument(RadFlowDocument sourceDocument, RadFlowDocument targetDocument){ DocumentElementImporter importer = new DocumentElementImporter(targetDocument, sourceDocument, ConflictingStylesResolutionMode.UseTargetStyle); Section section = sourceDocument.EnumerateChildrenOfType<Section>().First(); Section importedSection = importer.Import(section); targetDocument.Sections.Add(importedSection); sourceDocument.Sections.Remove(section);}Importing document with invalid bookmarks throws System.Collections.Generic.KeyNotFoundException. The issue is caused by an invalid bookmark having missing BookmarkRangeStart/bookmarkStart or BookmarkRangeEnd/bookmarkEnd elements.
document.DefaultTabStopWidth = 0.1;For example, <h1> is imported as Heading 1 with font the following properties:
While MS Word imports it as:
When exporting, an option of how to create the PDF bookmarks should be provided:
- Using the RadFlowDocument bookmarks
- Using document Headings
The non-breaking hyphen element is currently not supported in the model and is stripped when importing the document.
foreach (var section in this.document.Sections){ bool shouldInsert = false; foreach (var block in section.Blocks.ToList()) { var paragraph = block as Paragraph; if (paragraph != null && paragraph.ListId > -1) { shouldInsert = true; } else if (shouldInsert) { var paragraphToInsert = new Paragraph(this.document); paragraphToInsert.Spacing.LineSpacing = 1; paragraphToInsert.Spacing.LineSpacingType = HeightType.Exact; paragraphToInsert.Spacing.SpacingAfter = 0; block.BlockContainer.Blocks.Insert(section.Blocks.IndexOf(block), paragraphToInsert); shouldInsert = false; } }}