foreach (var style in this.document.StyleRepository.Styles)
{
if (style.StyleType == StyleType.Table)
{
if (style.LinkedStyleId != null)
{
style.LinkedStyleId = null;
}
}
}
When applying a table or table cell border with no thickness specified, the border is exported with a default thickness value of zero. However, by specification, the default value should be 2.
Workaround: Create a border by specifying the thickness value. For example:
table.Borders = new TableBorders(new Border(thickness, BorderStyle.Single, new ThemableColor(Colors.Black)));
In WordsProcessing on import only the lower case CSS attributes are correctly imported. Upper case and mixed case are ignored and the default values are used.
The property controls whether a paragraph should be rendered at least partially on the same page with the following paragraph when the document is shown in page view mode.
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"
/>
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.
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);
}
When the document contains an image that is defined as an external resource but is not available in the specified location and cannot be found, a KeyNotFoundException is thrown. Handle this exception and replace the missing image with a default one for such cases. Consider exposing an option to notify the user about this error.