Last Updated: 18 Mar 2019 09:54 by ADMIN
When a list is just before the table, all of its list items are inserted in the first cell of the table while exporting to HTML.

Workaround: Add a paragraph between the list and the table
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;
Last Updated: 18 Mar 2019 09:45 by ADMIN
By specification, the document AcroForm contains fields with no parents. However, some documents may have child fields in the AcroForm. This leads to ArgumentException when importing the child and parent fields - 'An item with the same key has already been added.' since the child field is added twice.
Last Updated: 13 Mar 2019 21:47 by ADMIN
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");
Last Updated: 13 Mar 2019 16:39 by ADMIN
Table and table cell borders are not evaluated according to inheritance and conflict resolution rules. A conflict will occur when different borders from the table and table cell are overlapping. 

The GetActualValue method of the TableBorders and TableCellBorders could potentially return an incorrect value in some of the following scenarios:

Scenario 1:
A table has cell spacing set to 0. Meaning that the table and table cell borders will overlap.
The table borders have defined all of its borders with border style "Single".
The table cell borders have all of its borders defined with border style "None".

Expected result: the resulting borders should have the border style set to "None" for the location where the table and the cell borders are overlapping.

Scenario 2:
A table has explicitly defined that its right border is with border style "None".
The table has a table style applied with defined border style of type "Single" for all table borders.

Expected result: All of the table borders except the right border should have border style of "Single".

The problem is mostly visible when exporting to PDF and RTF format.
Last Updated: 13 Mar 2019 12:14 by ADMIN
ArgumentException is thrown when importing documents containing empty values
Last Updated: 13 Mar 2019 10:59 by ADMIN
By specification, the src attribute for images in the HTML content must be present and must contain a valid non-empty URL potentially surrounded by spaces.

However when embedded images with leading white spaces are imported, UriFormatException: 'Invalid URI: The Uri string is too long.', is thrown.
Last Updated: 12 Mar 2019 16:39 by ADMIN

The calculations are wrong, leading to single lines on a page. As a result, the content of the PDF document is laid out on a bigger number of pages.

Workaround: Change the line spacing and its type before exporting to PDF:

foreach (var paragraph in this.document.EnumerateChildrenOfType<Paragraph>())
    if (paragraph.Properties.LineSpacingType.GetActualValue() == Telerik.Windows.Documents.Flow.Model.Styles.HeightType.Exact)
        paragraph.Properties.LineSpacingType.LocalValue = Telerik.Windows.Documents.Flow.Model.Styles.HeightType.Auto;
        paragraph.Properties.LineSpacing.LocalValue = 2;

Last Updated: 11 Mar 2019 17:39 by ADMIN

In a DOCX document, the users can define an image which is bigger than the size of the page. When such an image is at the beginning of the document and is converted with PdfFormatProvider, an additional page is added in the result PDF.

Workaround: Check the image and resize it if needed:
foreach (var image in document.EnumerateChildrenOfType<ImageInline>())
    var section = image.Paragraph.Parent as Section;
    if (image.Image.Height > section.PageSize.Height - section.PageMargins.Top - section.PageMargins.Bottom)
        var height = section.PageSize.Height - section.PageMargins.Top - section.PageMargins.Bottom - (image.Paragraph.Spacing.SpacingAfter * (image.Paragraph.Spacing.LineSpacing - 0.97));
        image.Image.Size = new System.Windows.Size(image.Image.Width, height);

Last Updated: 07 Mar 2019 08:39 by ADMIN
When creating a GradientStop, an alpha channel of the color could be applied. However, this setting is not respected it the result document and the gradient is with full opacity.

Steps to reproduce:
1. Create a gradient with an alpha channel:

RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();
FixedContentEditor containerEditor = new FixedContentEditor(page);

LinearGradient linearGradient = new LinearGradient(new Point(0, 0), new Point(30, 30));
linearGradient.GradientStops.Add(new GradientStop(new RgbColor(10, 0, 207, 0), 0));
linearGradient.GradientStops.Add(new GradientStop(new RgbColor(10, 0, 102, 204), 1));

containerEditor.GraphicProperties.FillColor = linearGradient;
containerEditor.DrawRectangle(new Rect(10, 10, 48, 29));

2. Export the document to PDF

Observed: The alpha channel is not respected and the gradient is with full opacity
Last Updated: 06 Mar 2019 14:39 by ADMIN
In the document produced by the mail merge, the date time formatting applied is not respected and the value is in its default format. 
Last Updated: 06 Mar 2019 07:33 by ADMIN
The value formula =Round(1.015, 2) returns 1.01 which is incorrect. Excel returns 1.02.
Last Updated: 28 Feb 2019 13:55 by ADMIN
When opened in Adobe Reader it says that the file "claims compliance". However, when verifying the compliance with some validation tools there seem to be some issues mainly related but not limited to fonts. 
Last Updated: 27 Feb 2019 09:31 by ADMIN
By specification the last line of the file contains only the end-of-file marker, %%EOF. When importing document with missing EOF, InvalidOperationException: 'Stack empty', is thrown.
Last Updated: 18 Feb 2019 13:03 by ADMIN
There is a mismatch between the coordinates of the image and its mask causing some lines to appear in the PDF document. Extracting the image itself in a separate file doesn't show any issues - they can be seen only in the generated document.
Last Updated: 18 Feb 2019 12:50 by ADMIN
The GetActualValue() method returns an incorrect value when content has applied a paragraph style (e.g. Heading1) but its linked style is not used (e.d. Heading1Char). Affects the PDF export.
Last Updated: 14 Feb 2019 15:31 by ADMIN
When MergeField is present in the document, and this merge field is evaluated to an empty string - this, for example, happens when the property in the data source is set to null, empty string, or is missing at all - the result fragment remains in the result document. Instead, it should be removed.

Steps to reproduce: 
- Create document with merge field, the field should contain result fragment, and set data source which contains null or string.Empty value for the field:

            RadFlowDocument document = new RadFlowDocument();
            RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);

            editor.InsertField("MERGEFIELD FirstName ", "«FirstName»");

            List<Person> source = new List<Person>()
                new Person() { FirstName = string.Empty }

            RadFlowDocument mergedDocument = document.MailMerge(source);
Expected: The result document is empty.
Actual: The result document contains "«FirstName»" string.

Available in LIB Version 2017.3.1120.
Last Updated: 07 Feb 2019 13:23 by ADMIN
By specification the explicit destinations define a required page property. However, some documents contain definition for destinations with null page value, which causes an ArgumentNullException on import.
Last Updated: 31 Jan 2019 16:26 by ADMIN
When a document is exported with a cross-reference stream, the stream is missing the required according to the specification Length property. Although most of the viewers open the document without any issues, some cannot. Such documents cannot be opened in MS Edge.
Last Updated: 31 Jan 2019 13:30 by ADMIN
Created by: Tanya
Comments: 4
Category: PdfProcessing
Type: Bug Report
When merging, only the widgets are copied but not their fields. This can lead to ArgumentNullException when exporting the document. Implement copying the fields and consider cases which include collision of names of the fields.

Repair the generated document using the following code:
foreach (Widget widget in this.pdfDocument.Annotations.Where(annot => annot.Type == AnnotationType.Widget))
    if (!this.pdfDocument.AcroForm.FormFields.Contains(widget.Field.Name))
In case of Name collision, you can use the attached project or the attached project to the following feedback item to rename the duplicate fields: Provide a way to rename FormFields.
Last Updated: 30 Jan 2019 13:49 by ADMIN
If a paragraph is numbered and its last run is underlined, on export to PDF, the numbering will be underlined as well. This does not apply for other formatting options, like font weight and font color. When exported to DOCX the numbering is not underlined.

Item is duplicate of WordsProcessing: List bullets are exported to PDF underlined/highlighted when the last run in the corresponding paragraph is underlined/highlighted