Unplanned
Last Updated: 12 Mar 2019 16:39 by ADMIN
Ron Weingarten
Created on: 12 Mar 2019 15:59
Category: WordsProcessing
Type: Bug Report
2
WordsProcessing: Incorrect calculation of line spacing when converting document with Exact or atLeast line spacing to PDF

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>())
{
	HeightType? heightType = paragraph.Properties.LineSpacingType.GetActualValue();
	if (heightType == HeightType.Exact || heightType == HeightType.AtLeast) 
	{
		paragraph.Properties.LineSpacingType.LocalValue = Telerik.Windows.Documents.Flow.Model.Styles.HeightType.Auto;
		paragraph.Properties.LineSpacing.LocalValue = 2;
	}
}

 

0 comments