Use leading to size column heights correctly.
This commit is contained in:
parent
af15309bda
commit
43b06c1abd
@ -197,7 +197,14 @@ namespace Volian.Print.Library
|
||||
}
|
||||
iTextSharp.text.Paragraph myPara = RtfToParagraph(str);
|
||||
myColumnText1.SetSimpleColumn(0, 0, w - 2, MyContentByte.PdfDocument.PageSize.Top); // Padding = 4
|
||||
myPara.MultipliedLeading = 1.00F; // RHM 20120925 - Line spacing should be 6 lines per inch.
|
||||
|
||||
// RHM 20120925 - Line spacing should be 6 lines per inch. In order to get a valid value
|
||||
// for TotalLeading you have to set MultipliedLeading first:
|
||||
myPara.MultipliedLeading = 1.0f;
|
||||
// once there is valid value for TotalLeading (from previous line), you can use it to
|
||||
// calculate a MultipliedLeading to give 6 LPI (12 points)
|
||||
myPara.MultipliedLeading = 12.0f / myPara.TotalLeading;
|
||||
|
||||
myPara.SpacingAfter = 8; // RHM 20120925 - Add a line to properly space text from lines.
|
||||
myColumnText1.AddElement(myPara);
|
||||
//myColumnText1.Canvas.SetColorFill(PrintOverride.OverrideTextColor(System.Drawing.Color.Black));
|
||||
|
Loading…
x
Reference in New Issue
Block a user