Fixed logic that determines when a step is continued on next page so that it uses the phonelist length

Fixed logic that counts the number of lines a phone list takes
Added number of lines an item take up in our debug (micro-print) message
This commit is contained in:
2014-08-22 17:07:14 +00:00
parent 9393fc01d4
commit 310fb42c3c
4 changed files with 9 additions and 6 deletions

View File

@@ -753,7 +753,7 @@ namespace Volian.Print.Library
IParagraph.Chunks.RemoveAt(0);
}
}
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo, yBottomMargin);
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}",YSize/SixLinesPerInch), yBottomMargin);
if (retval == 0) // problem occurred - paragraph was not able to be printed on page
{ // pagination logic needs to be fixed.
ForcePagination(cb, ref yPageStart, yTopMargin, yBottomMargin, ref yLocation, ref retval);