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:
@@ -227,7 +227,7 @@ namespace Volian.Print.Library
|
||||
// ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||
if (MyPageHelper.DidFirstPageDocStyle && (MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnAllButFirstPage) > 0)
|
||||
yPageSizeNextPage = GetYPageSizeUseOnAllButFirstPage();
|
||||
if (!KeepWithHeader && !KeepStepsOnPage && YSize - SixLinesPerInch + yEndMsg <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
||||
if (!KeepWithHeader && !KeepStepsOnPage && YSize - SixLinesPerInch + yEndMsg <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
||||
{
|
||||
// Don't want extra line before step
|
||||
//Console.WriteLine("'PageBreak',2,'Yes','HLS will fit on 1 Page',{0},{1},{2}, {3}, {4},'{5}'", MyItemInfo.ItemID, YSize, yPageSize, yWithinMargins, (int)(100 * yWithinMargins / yPageSize), MyItemInfo.ShortPath);
|
||||
@@ -436,8 +436,10 @@ namespace Volian.Print.Library
|
||||
break;
|
||||
}
|
||||
// also account for phonelist for locating bottom continue message:
|
||||
float phoneListHeight = 0;
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList && MyPageHelper.PhoneListHeight != 0)
|
||||
myBottomMsgSpace += (MyPageHelper.PhoneListHeight - vlnPrintObject.SixLinesPerInch);
|
||||
phoneListHeight = MyPageHelper.PhoneListHeight;
|
||||
ySpaceOnCurPage -= phoneListHeight;
|
||||
|
||||
string myTopMsg = docstyle.Continue.Top.Message;
|
||||
float myTopMsgSpace = ((myTopMsg ?? "") != "") ? 2 * SixLinesPerInch : 0;
|
||||
@@ -554,7 +556,7 @@ namespace Volian.Print.Library
|
||||
RemoveProcessedParagraphs(myList, yTopNew - yTop);
|
||||
yTop = yTopNew;
|
||||
MyPageHelper.ParaBreaks.Add(paraBreak);
|
||||
ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
ySpaceOnCurPage = yPageSize - (myTopMsgSpace + phoneListHeight + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
//ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line.
|
||||
//if (paraBreak.YTopMost != paraBreak.YVeryTop && MyPageHelper.TopMessage == null && MyPageHelper.BottomMessage == null)
|
||||
// ySpaceOnCurPage = yPageSize;
|
||||
|
Reference in New Issue
Block a user