Declined
Last Updated: 03 May 2016 10:37 by ADMIN
ADMIN
Ianko
Created on: 05 Apr 2016 07:54
Category:
Type: Bug Report
0
Moved to TDP: List indentation is imported as local paragraph properties from RTF format provider
When the indentation of a paragraph is coming from a list, the RTF format provider applies them to the paragraph as local properties.

There is a workaround for this problem. After importing the document check if the indentation of the paragraph is the same as the one coming from the list. Here is example on how this could be done:

RtfFormatProvider provider = new RtfFormatProvider(); 
RadFlowDocument document = provider.Import(stream); 

foreach (Paragraph paragraph in document.EnumerateChildrenOfType<Paragraph>()) 
{ 
	List list = this.document.Lists.GetList(paragraph.ListId); 
	if (paragraph.Indentation.HangingIndent == list.Levels[0].ParagraphProperties.HangingIndent.LocalValue) 
	{ 
		paragraph.Indentation.HangingIndent = Paragraph.HangingIndentPropertyDefinition.DefaultValue.Value; 
	} 

	if (paragraph.Indentation.FirstLineIndent == list.Levels[0].ParagraphProperties.FirstLineIndent.LocalValue) 
	{ 
		paragraph.Indentation.FirstLineIndent = Paragraph.FirstLineIndentPropertyDefinition.DefaultValue.Value; 
	}
}
This item is migrated to the Telerik Document Processing portal: 
http://feedback.telerik.com/Project/184/Feedback/Details/190246 
Please use the new item for commenting, voting and subscribing instead of this one.
0 comments