pagination fixes for IP3 asterisk box & rno separator
This commit is contained in:
parent
9c464278f3
commit
77da149ce7
@ -274,8 +274,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
if (_Match16BitPagination) mySize = YSize;
|
||||
float ySize7LPI = YSize; // +SixLinesPerInch;
|
||||
if (_Match16BitPagination) ySize7LPI += SixLinesPerInch;
|
||||
string firstStep = "No";
|
||||
if (MyItemInfo.IsHigh && MyItemInfo.MyPrevious == null)
|
||||
firstStep = "Yes";
|
||||
@ -293,6 +291,10 @@ namespace Volian.Print.Library
|
||||
KeepStepsOnPage = false;
|
||||
bool KeepWithHeader = isFirstChild && nearTheTop;
|
||||
if (BreakHighLevelStepWithSection) KeepWithHeader = true;
|
||||
// for a HLS that has an asterisk box with the rno separator IN the box, adjust the size by 2 lines to account for box.
|
||||
if (MyItemInfo.IsStep && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex != null && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex >= 0 &&
|
||||
(MyItemInfo.RNOs==null ||MyItemInfo.RNOs.Count==0))
|
||||
mySize += (2*SixLinesPerInch);
|
||||
if (!ManualPageBreak && (mySize + yEndMsg <= yWithinMargins + yExtra) || // Don't Paginate if there is enough room, will fit on page
|
||||
(mySize <= yWithinMargins + yExtra && SpecialCaseForRobinson()))
|
||||
//if (!ManualPageBreak && mySize + yEndMsg <= yWithinMargins + SixLinesPerInch) // Don't Paginate if there is enough room, will fit on page
|
||||
@ -318,6 +320,11 @@ namespace Volian.Print.Library
|
||||
// If this format flag is not set, or not printing the first page of the section with this flag,
|
||||
// this next page size is the same as current page size.
|
||||
float yPageSizeNextPage = yPageSize;
|
||||
mySize = YSize; // reset in case mySize changed for current page is compressed
|
||||
// for a HLS that has an asterisk box with the rno separator IN the box, adjust the size by 2 lines to account for box.
|
||||
if (MyItemInfo.IsStep && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex != null && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex >= 0 &&
|
||||
(MyItemInfo.RNOs == null || MyItemInfo.RNOs.Count == 0))
|
||||
mySize += (2 * SixLinesPerInch);
|
||||
//if (firstStep == "No")
|
||||
// ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin);
|
||||
if (MyPageHelper.DidFirstPageDocStyle && (MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnAllButFirstPage) > 0)
|
||||
@ -367,7 +374,9 @@ namespace Volian.Print.Library
|
||||
}
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && yPageSizeNextPage < yWithinMargins + 3*72 && MyItemInfo.MyPrevious == null)
|
||||
KeepStepsOnPage = true;
|
||||
if (!KeepWithHeader && !KeepStepsOnPage && YSize - SixLinesPerInch + yEndMsg <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
||||
float mySize7LPI = mySize; // +SixLinesPerInch;
|
||||
if (_Match16BitPagination) mySize7LPI += SixLinesPerInch;
|
||||
if (!KeepWithHeader && !KeepStepsOnPage && mySize - 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);
|
||||
@ -386,7 +395,7 @@ namespace Volian.Print.Library
|
||||
|
||||
// ySize7LPI includes a blank line after the step which we don't want to include in the page break test.
|
||||
else if (!KeepStepsOnPage && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CompressSteps
|
||||
&& (ySize7LPI - SixLinesPerInch + yEndMsg) < (yPageSizeNextPage * SixLinesPerInch / _SevenLinesPerInch))
|
||||
&& (mySize7LPI - SixLinesPerInch + yEndMsg) < (yPageSizeNextPage * SixLinesPerInch / _SevenLinesPerInch))
|
||||
{
|
||||
// ooooooooo ooooo ooooooooo. ooooo
|
||||
// d"""""""8' `888' `888 `Y88. `888'
|
||||
@ -565,12 +574,16 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (breakOrNot != "No")
|
||||
{
|
||||
bool hasBox = MyItemInfo.IsStep && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex != null && MyItemInfo.MyHLS.FormatStepData.StepLayoutData.STBoxindex >= 0;
|
||||
bool rnoSepIn = (MyItemInfo.RNOs==null ||MyItemInfo.RNOs.Count==0);
|
||||
// DebugPagination.WriteLine("{0}", MyItemInfo.DBSequence); //,instance);
|
||||
if (DebugPagination.IsOpen) DebugPagination.WriteLine("{0:D6},'{1}',{2},'{3}','{4}',{5},{6},{7},{8},{9}",
|
||||
if (DebugPagination.IsOpen) DebugPagination.WriteLine("{0:D6},'{1}',{2},'{3}','{4}',{5},{6},{7},{8},{9},{10},{11}",
|
||||
MyPageHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber - (breakOrNot == "Yes" ? 0 : 1),
|
||||
MyItemInfo.ShortPath, instance,
|
||||
(manualPageBreak ? "Manual " : "") + message, breakOrNot,
|
||||
MyItemInfo.ItemID, YSize, yPageSize, yWithinMargins, (int)(100 * yWithinMargins / yPageSize));
|
||||
MyItemInfo.ItemID, YSize, yPageSize, yWithinMargins, (int)(100 * yWithinMargins / yPageSize),
|
||||
hasBox, rnoSepIn
|
||||
);
|
||||
}
|
||||
// Console.WriteLine("{0},{1}", MyItemInfo.DBSequence, IsFirstSubStep(MyItemInfo)); //,instance);
|
||||
}
|
||||
|
@ -328,7 +328,8 @@ namespace Volian.Print.Library
|
||||
// increment the y offset if not doing the ComponentTableFormat
|
||||
else if (!para.UseTemplateKeepOnCurLine(childItemInfo))
|
||||
yoff = para.YBottomMost;
|
||||
// para.YBottomMost += para.YBottomMostAdjust; // KBR for IP3 pagination: don't adjust YBottomost until after yoff is set.
|
||||
// don't adjust YBottomost until after yoff is set for the RNO Separator
|
||||
para.YBottomMost += para.YBottomMostAdjust;
|
||||
if (box != null && childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.BoxIt)
|
||||
{
|
||||
box.Height = yoff - box.YOffset - (1.1F * vlnPrintObject.SixLinesPerInch);
|
||||
@ -3315,7 +3316,7 @@ namespace Volian.Print.Library
|
||||
if (yadjSep > 0)
|
||||
{
|
||||
MyHighLevelParagraph.YBottomForBox = yoff; // if hlrno, box before sep
|
||||
//YBottomMostAdjust = SixLinesPerInch; // KBR for IP3 pagination
|
||||
YBottomMostAdjust = SixLinesPerInch; // added for IP3 pagination, the RNO separator is outside asterisk box
|
||||
}
|
||||
yoff += (myRnoSep.Height + SixLinesPerInch);
|
||||
}
|
||||
@ -4031,12 +4032,12 @@ namespace Volian.Print.Library
|
||||
get { return _YBottomMost; }
|
||||
set { _YBottomMost = value; }
|
||||
}
|
||||
//protected float _YBottomMostAdjust = 0; // KBR for IP3 pagination
|
||||
//public float YBottomMostAdjust
|
||||
//{
|
||||
// get { return _YBottomMostAdjust; }
|
||||
// set { _YBottomMostAdjust = value; }
|
||||
//}
|
||||
protected float _YBottomMostAdjust = 0; // the RNO separator is outside asterisk box, account for additional Y space
|
||||
public float YBottomMostAdjust
|
||||
{
|
||||
get { return _YBottomMostAdjust; }
|
||||
set { _YBottomMostAdjust = value; }
|
||||
}
|
||||
protected float _YTopMost; // Top of the paragraph including the children
|
||||
public float YTopMost
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user