The current implementation uses System.Windows.Media.Imaging.BitmapImage class in order to take the image pixels for the PDF export. However, BitmapImage class throws NotSupportedException when being initialized with a WMF or EMF image. WORKAROUND: WMF and EMF images may be converted to PNG images before the PDF export. The following code snippet shows how to convert all inline WMF image to PNG images by using System.Drawing.Image class:private
static
void
ConvertInlineWmfImagesToPng(RadFlowDocument document)
{
foreach
(ImageInline image
in
document.EnumerateChildrenOfType<ImageInline>())
{
if
(image.Image.ImageSource.Extension.Equals(
"wmf"
, StringComparison.InvariantCultureIgnoreCase))
{
using
(MemoryStream wmfImageStream =
new
MemoryStream(image.Image.ImageSource.Data))
{
using
(MemoryStream pngImageStream =
new
MemoryStream())
{
var imageDrawing = System.Drawing.Image.FromStream(wmfImageStream);
imageDrawing.Save(pngImageStream, ImageFormat.Png);
byte
[] pngBytes = pngImageStream.ToArray();
image.Image.ImageSource =
new
ImageSource(pngBytes,
"png"
);
}
}
}
}
}
Currently, this property is implemented only in DOCX and RTF exports.
Although this is not a valid table scenario we should not throw an exception when measuring and exporting such table. Fix available in LIB Version 2017.3.1218.
When the imported html contains an attribute of the type width="", Wordsprocessing throws ArgumentException and does not import the document.
This is happening because the cell with preferred width 100% takes all the available width and all other columns are rendered with no available width which causes the height of the table to grow big. WORKAROUND: Either clear the cell PreferredWidth property or set it to value which is smaller than 100%.
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.
This property will control whether a table row may start on one page and end on the next page. Declined: Duplicate with https://feedback.telerik.com/Project/184/Feedback/Details/190081-wordsprocessing-respect-tablerow-cansplit-property-when-exporting-to-pdf.
This field allows performing a mail merge operations with labels representing different source items on the same page.
<w:pict w14:anchorId="324D5836">
<v:rect id="_x0000_i1025" style="width:0;height:1.5pt" o:hralign="center" o:hrstd="t" o:hr="t" fillcolor="#a0a0a0" stroked="f"/>
</w:pict>
Importing an image from HTML with URI as a source, which has applied only width or height and exporting it to PDF (which forces getting the image data so it can be drawn) leads to an incorrect value of 1 (a default value) for the dimension that is not specified.
The default table style is not respected from the style system for character or paragraph properties when exporting to PDF format. It looks only into the default paragraph style. Steps to reproduce: 1. Create new Table style and set it as default. 2. Apply foreground themeable color with a value from the document theme. Like Accent1 3. Insert a table with some text in it. 4. Export to PDF. Observed: The text inside the table is not with the color from the document theme.
When exporting to PDF a paragraph in a list, whose first run is longer than the line, the bullets are rendered with wrong baseline and not aligned with the text.
Importing a document containing a bookmark located in a structured document tag (sdt) will lead to ArgumentNullException.
The properties applied to the paragraph marker are not respected when evaluating the style of the child elements. That leads to exporting the bullets in a list with their default settings when they are applied to the paragraph properties. The issue is reproducible when exporting to PDF and RTF. Workaround, applicable when the style of all the bullets in the specific list is the same: Change the style of the list level:foreach
(var paragraph
in
this
.document.EnumerateChildrenOfType<Paragraph>())
{
if
(paragraph.ListId > -1)
{
this
.document.Lists.GetList(paragraph.ListId).Levels[paragraph.ListLevel].CharacterProperties.CopyPropertiesFrom(paragraph.Properties.ParagraphMarkerProperties);
}
}
The control word (\~) is imported but the symbol is not parsed, therefore not included in the content. Fix available in LIB Version 2017.2.814.
In scenarios when center and right tabs are used for aligning the paragraph content to both left and right the text content in the exported PDF is not positioned as expected.
When a paragraph doesn't have applied a style, the Normal style should be automatically applied. Currently, similar paragraph obtains its style from the parent. This is reproducible when exporting to PDF and RTF. Workaround: Check if there is a paragraph without style ID and if so, set it to Normal: foreach (var paragraph in this.document.EnumerateChildrenOfType<Paragraph>()) { var value = paragraph.StyleId; if (string.IsNullOrEmpty(value)) { paragraph.StyleId = "Normal"; } } Available in LIB Version 2017.2.731.
This setting should allow setting the content between the list level bullet and the paragraph text to some of the following options: "tab", "space", "nothing".
Form fields are the legacy way to insert an editable controls in a document (text boxes, checkboxes, dropdowns) by using the FORMTEXT, FORMCHECKBOX and FORMDROPDOWN fields. Do not confuse with content controls (structured document tags) (see https://feedback.telerik.com/Project/184/Feedback/Details/190057 ) and with ActiveX controls.
Add support for the All Caps and Small Caps properties of the runs. These properties are currently ommitted on import.