When exporting to a PDF file, a document with a header containing a watermark, set by a shape, the rest of the header content is skipped and the header is exported with default margin values.
A possible workaround could be to set the watermark as an image.
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;
}
}
}
}
At this point the PdfFormatProvider does not support floating images and these elements are skipped when exporting to PDF. The feature is trivial for floating images with "Behind Text"/"In Front of Text" settings, but otherwise floating images are affecting the text layout in complex ways.
When importing a document with a style set in a parent <div> element its children`s content doesn't inherit it.
Steps to reproduce:
<div style="background-color: green;">
<h1>Test heading</h1>
<div>Test div</div>
</div>
Actual vs Expected:
Currently, the content of the span of such elements is imported:
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div id="progressBar" style="width: 100%; display: none;" class="themed-progressbar k-widget k-progressbar k-progressbar-horizontal" data-role="progressbar">
<span class="k-progress-status-wrap k-progress-end"><span class="k-progress-status">100%</span></span>
<div class="k-state-selected k-complete" style="width: 100%;">
<span class="k-progress-status-wrap k-progress-end" style="width: 100%;"><span class="k-progress-status">100%</span></span>
</div>
</div>
</body>
</html
Actual: the content of the spans is not skippet (100% 100%)
Expected: to be skipped
For example, <h1> is imported as Heading 1 with font the following properties:
While MS Word imports it as:
Add support for inline lists.
When the display attribute is set to inline all items should be on the same row (see attached)
In specific situations, a paragraph in a table cell which is last on a document page is not exported to the PDF document.
Possible workaround is adding a new paragraph to the last table cell before exporting the document.
For instance:
BlockCollection footerContent = this.document.Sections.First().Footers.Default.Blocks;
Table footerTable = footerContent.First() as Table;
footerTable.Rows.Last().Cells.First().Blocks.AddParagraph();
Support for table styles with different properties for first/last row and column, row bandings.
When the value contains a semicolon the HTML style property values are omitted on import:
<th width ='12%;' ...>
Currently, setting it without semicolon imports the value successfully:
<th width ='12%' ...>
Currently, the hyperlink is exported not as hyperlink text only but additionally, all the field data is included.
Steps to reproduce:
editor.InsertHyperlink(text:"telerik", uri:"http://www.telerik.com", isAnchor:false, toolTip:"Telerik site");
Actual: HYPERLINK "http://www.telerik.com" \o "Telerik site" Telerik
Expected: Telerik
Workaround:
IEnumerable<Run> runs = document.EnumerateChildrenOfType<Run>();
foreach (Run run in runs.ToList())
{
if (run.Text.Trim().StartsWith("HYPERLINK"))
{
run.Paragraph.Inlines.Remove(run);
}
}