The SVG element allows drawing paths, boxes, circles, text, and graphic images in HTML document.
Here is a sample:
<div style="border: 1px solid #ccc; border-radius: 5px; padding: 10px; margin: 10px; background-color: #f9f9f9;">
<table>
<tr>
<td>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" style="width:70px">
<path d="M20 35 L50 20 L80 35 L80 75 L50 90 L20 75 Z" fill="#1581A0"></path>
<path d="M50 20 L80 35 L80 75 L50 90 L50 20" fill="#1E3D6B" opacity="0.3"></path>
<path d="M35 40 L65 40 L65 70 L35 70 Z" fill="white" opacity="0.9"></path>
<path d="M35 50 L65 50" stroke="white" stroke-width="2" opacity="0.6"></path>
<path d="M35 60 L65 60" stroke="white" stroke-width="2" opacity="0.6"></path>
<path d="M45 40 L45 70" stroke="white" stroke-width="2" opacity="0.6"></path>
<path d="M55 40 L55 70" stroke="white" stroke-width="2" opacity="0.6"></path>
<path d="M20 35 L50 20 L80 35" fill="none" stroke="white" stroke-width="1.5" opacity="0.2"></path>
</svg>
</td>
<td>
<h1 style="padding-top: 9px;">Property Comparables Ltd</h1>
</td>
</tr>
</table>
</div>
The expected result should look in a similar way in the browser:
The alternative text allows setting a description of the information contained inside the table and is useful for people who may not be able to see the content.
margin-top margin-right margin-bottom margin-left
Background properties do not inherit, but the parent element's background will shine through by default because of the initial 'transparent' value on 'background-color'.
HTML content:
<div style="background-color: gray; color: red">
Text outside the list
<ul>
<li>
Text in the list
</li>
</ul>
</div>
The result when exported to DOCX/PDF:
Workaround: set the style directly to the <ul> element:
<div style="background-color: gray; color: red">
Text outside the list
<ul style="background-color: gray;">
<li>
Text in the list
</li>
</ul>
</div>
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);
}
When the table is nested in another table with fixed-width and the nested one has more than one cell in the row, where the one has a preferred width set to auto and the other has content that split on more than one row, then the first cell is exported with a wrong width.
Text frames are paragraphs of text in a document which are positioned in a separate region or frame in the document and can be positioned with a specific size and position relative to non-frame paragraphs in the current document. More information about it is available in section 22.9.2.18 ST_XAlign (Horizontal Alignment Location) of Open Office XML.
The Hyperlink field is wrongly exported when the Code fragment is divided into several text fragments.
Actual:
Expected:
Workaround: Iterate the document content after importing it into RadFlowDocument in order to modify the Code fragment:
bool isBetweenStartAndSeparation = false;
string fieldInfoText = string.Empty;
int startIndex = 0;
IEnumerable<Paragraph> paragraphs = document.EnumerateChildrenOfType<Paragraph>();
foreach (Paragraph paragraph in paragraphs)
{
foreach (InlineBase inline in paragraph.Inlines.ToList())
{
if (inline is FieldCharacter)
{
FieldCharacter fieldCharacter = inline as FieldCharacter;
if (fieldCharacter.FieldCharacterType == FieldCharacterType.Separator)
{
isBetweenStartAndSeparation = false;
Run run = new Run(this.document)
{
Text = fieldInfoText
};
paragraph.Inlines.Insert(startIndex, run);
}
else if (fieldCharacter.FieldCharacterType == FieldCharacterType.Start)
{
isBetweenStartAndSeparation = true;
startIndex = paragraph.Inlines.IndexOf(inline) + 1;
fieldInfoText = fieldCharacter.FieldInfo.GetCode().Trim().ToLowerInvariant();
}
}
else if (isBetweenStartAndSeparation)
{
paragraph.Inlines.Remove(inline);
}
}
}
The Nonbreaking space is exported as a Unicode character instead of the appropriate Control word.
Actual: "\n160?"
Expected: "\~"
In addition to the values containing numbers, the font-size property can have one of the following values as well: medium|xx-small|x-small|small|large|x-large|xx-large|smaller|larger|initial|inherit; At this point, HtmlFormatProvider skips these values and applies default font-size to the content. To import similar content with the proper styling, the customer can replace the CSS keywords with their equivalents in px.
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".
Make it possible to import HTML file with an external style sheet, without the need to handle the LoadStyleSheetFromUri event in HtmlImportSettings. If the URL is correct the data can be internally downloaded.
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.