Added suffix to GetParagraphHeight to calculate the height of the Continue Message.

Added ContinueHeight property to calculate tthe height of the Section continue message.
This commit is contained in:
Rich
2015-02-26 18:48:29 +00:00
parent 5d227213c5
commit 6732e6c9fc
5 changed files with 39 additions and 12 deletions

View File

@@ -1097,6 +1097,24 @@ namespace Volian.Print.Library
return (prTab + thisTab.Trim()).TrimEnd(".".ToCharArray());
}
private static bool DoSubs = true; // flag whether to print substeps (don't if doing continued checklist header)
protected float _ContinueHeight=0;
public virtual float ContinueHeight
{
get
{
int profileDepth = ProfileTimer.Push(">>>> vlnPrintObject.ContinueHeight");
if (_ContinueHeight == 0
&& MyItemInfo.MyDocStyle.Continue.Top.Message.Contains("%s")
&& MyItemInfo.MyDocStyle.Continue.Top.Message.ToUpper().EndsWith(" (Continued)".ToUpper()))
{
string suffix = MyItemInfo.MyDocStyle.Continue.Top.Message.Replace("%sR","").Replace("%s","");
_ContinueHeight = GetParagraphHeight(MyContentByte, IParagraph, suffix, Width);
}
ProfileTimer.Pop(profileDepth);
return _ContinueHeight;
}
set { _Height = value; }
}
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
{
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.ToPdf");