Approved
Last Updated: 11 Jan 2019 13:58 by ADMIN
ADMIN
Tanya
Created on: 14 Aug 2017 14:34
Category: WordsProcessing
Type: Bug Report
1
WordsProcessing: The properties of the paragraph symbol are not respected when exporting list to PDF and RTF
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 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);
    }
}

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
3 comments
ADMIN
Tanya
Posted on: 11 Jan 2019 13:58
Hi Manu,

After a discussion in the support system, it turned out that this is a different issue and we created another item for it: Incorrect calculation of indentation when paragraph in list has no local indent but the list style defines left indent so you can follow it for updates about this behavior.

Regards,
Tanya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Manu
Posted on: 06 Jan 2019 21:07

Hi,

to fix the problem with symbol and indentation:

foreach (var paragraph in this.document.EnumerateChildrenOfType<Paragraph>())
{
    if (paragraph.ListId > -1)
    {

    // fixes the Symbol  problem   this.document.Lists.GetList(paragraph.ListId).Levels[paragraph.ListLevel].CharacterProperties.CopyPropertiesFrom(paragraph.Properties.ParagraphMarkerProperties);

    // fixes the indentation; chose a fitting value for LeftIndent
    this.document.Lists.GetList(paragraph.ListId).Levels[paragraph.ListLevel].ParagraphProperties.LeftIndent.LocalValue = 24;
    }
}
Manu
Posted on: 05 Jan 2019 17:40

Thanks for the workaround. It works great.

Minor problem: In my case, besides that the symbol is changed also the indentation is changed upon PDF-conversion. The workaround fixes the symbol back to the correct one, but the indentation is not fixed.

Regards, Manu