Completed
Last Updated: 21 Mar 2024 05:53 by ADMIN
Release 2024.1.305 (2024 Q1)

Styles with names only different in spaces are treated as one.

Workaround:

var rtf = File.ReadAllText(fileName);
rtf = this.RenameStyleDifferentInOnlySpaces(rtf);
var document = provider.Import(rtf);

...

private string RenameStyleDifferentInOnlySpaces(string rtf)
{
    HashSet<string> styles = new HashSet<string>();

    string pattern = @"{\\(?:\*\\c)?s([0-9]+)[^}]*\n?[^}]*\\[^' ]* ?'?([^;]*)";

    var matches = Regex.Matches(rtf, pattern);
    foreach (Match match in matches)
    {
        string styleName = match.Groups[2].Value.Replace(" ", string.Empty);
        if (styles.Contains(styleName))
        {
            styleName = this.ReplaceOldStyleName(ref rtf, styles, match).Replace(" ", string.Empty);
        }

        styles.Add(styleName);
    }

    return rtf;
}

private string ReplaceOldStyleName(ref string rtf, HashSet<string> styles, Match match)
{
    string oldStyleName = match.Groups[2].Value;
    StringBuilder styleNameBuilder = new StringBuilder(oldStyleName + "0");
    while (styles.Contains(styleNameBuilder.ToString().Replace(" ", string.Empty)))
    {
        styleNameBuilder.Append("0");
    }

    string oldMatch = match.Groups[0].Value;
    string newMatch = oldMatch.Replace(oldStyleName, styleNameBuilder.ToString());
    rtf = rtf.Replace(oldMatch, newMatch);
    return styleNameBuilder.ToString();
}

Completed
Last Updated: 14 Mar 2024 08:59 by ADMIN
Release 2024.1.305 (2024 Q1)
HtmlFormatProvider: Paragraph property AutomaticSpacingBefore is set to true instead of false.
Completed
Last Updated: 14 Mar 2024 08:59 by ADMIN
Release 2024.1.305 (2024 Q1)

StackOverflowException when importing a document with style based on itself.

Use the following code to strip the faulty "based on" definition from the RTF:

RtfFormatProvider provider = new RtfFormatProvider();
var rtf = File.ReadAllText(ofd.FileName);
rtf = this.ReplaceSelfBasedOnStyle(rtf);
this.flowDocument = provider.Import(rtf);

...

private string ReplaceSelfBasedOnStyle(string rtf)
{
    string pattern = @"{[\n]*\\s[0-9]+[^;]* \\\w* (Normal);}";

    var matches = Regex.Matches(rtf, pattern);
    foreach (Match match in matches)
    {
        string oldValue = match.Value;
        string newValue = oldValue.Replace(@"\sbasedon0 ", string.Empty);

        rtf = rtf.Replace(oldValue, newValue);
    }

    return rtf;
}

Completed
Last Updated: 11 Jan 2024 08:24 by ADMIN
Release 2024 Q1
PdfFormatProvider: Inline image surrounded by bookmarks is incorrectly measured when the document contains numbering fields.
Completed
Last Updated: 06 Nov 2023 15:51 by Valery
Release R3 2023 SP1
Importing a Document (.doc) where the entire content is in a table leads to an endless loop.
Completed
Last Updated: 03 Nov 2023 11:42 by Kurt
Release R3 2023
FormatException when importing a document with "start" or "end" values for borders. 
Completed
Last Updated: 03 Nov 2023 10:46 by ADMIN
Release R3 2023
When a value contains points (w:pos="85.50pt") can't be properly converted. FormatException: 'Input string was not in a correct format.' occurs. 
Completed
Last Updated: 31 Oct 2023 15:07 by ADMIN
Release R3 2023 SP1
Fonts that are not surrounded by curly braces cannot be imported in the RTF format
Completed
Last Updated: 31 Oct 2023 14:53 by ADMIN
Release R3 2023 SP1

Exception when converting table with empty runs in the cells.

 

 

Completed
Last Updated: 31 Oct 2023 14:44 by ADMIN
Release R3 2023 SP1
List item (HTML) that contains paragraph is shown on the next line when exporting to PDF
Completed
Last Updated: 31 Oct 2023 14:40 by ADMIN
Release R3 2023 SP1
When importing documents containing pictures with references represented with the r:link attribute, ArgumentNullException is thrown.
Completed
Last Updated: 31 Oct 2023 08:30 by ADMIN
Release R3 2023 SP1
Empty lists with auto-close tags (i.e. <ol />) break the numbering of the lists declared after them.
Completed
Last Updated: 12 Oct 2023 14:31 by ADMIN
Release R3 2023 SP1

When mailmerging a document, with nested mail merge group which starts inside a table and ends outside the table, a NullReferenceException is thrown: "System.NullReferenceException: 'Object reference not set to an instance of an object.' firstParagraphInTemplate was null."

Workaround: move the group end (EndGroup, TableEnd, RangeEnd, or GroupEnd) merge field inside the table where the group starts.

Completed
Last Updated: 27 Sep 2023 10:27 by ADMIN
Release R3 2023
System.InvalidOperationException is thrown on the import of a document containing content control with no content when it is the first item in the current section. The message is: "Sequence contains no elements".
Completed
Last Updated: 19 Sep 2023 07:23 by ADMIN
Release R3 2023
Exporting a document to PDF throws a System.ArgumentException: 'Width and Height must be non-negative.' The line height property is calculated to less than zero.
Completed
Last Updated: 12 Sep 2023 08:16 by ADMIN
Release R3 2023
Exporting a document with a shape containing PictureFill fails with NullReferenceException.
Completed
Last Updated: 08 Sep 2023 12:33 by ADMIN
Release R3 2023
A table cell with a dark background is always exported with a white foreground.
Completed
Last Updated: 28 Aug 2023 12:15 by ADMIN
Release R3 2023
When border styles are both set inline and in CSS they are wrongly evaluated.

Completed
Last Updated: 05 Jul 2023 08:14 by ADMIN
Release R2 2023 SP1
PdfFormatProvider: NullReferenceException when exporting bookmarks spanning more than one paragraph.
Completed
Last Updated: 05 Jul 2023 07:14 by ADMIN
Release R2 2023 SP1
When some character is not supported by the font, the fallback mechanism should try finding some other font that is capable of rendering the unsupported character. However, RadPdfProcessing fallback mechanism does not always find the correct font which sometimes result in wrong glyph visualization or in missing glyph.

Workaround: Font that supports these special characters may be used. This way the fallback mechanism will not be needed to export the PDF text.
1 2 3 4 5 6