diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 250e8ef4..da63fe3c 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -443,8 +443,17 @@ namespace Volian.Print.Library adjMsgY = (float)-MyItemInfo.MyDocStyle.End.Flag * SixLinesPerInch; if (yEndMsg != 0) yEndMsg += adjMsgY; } - if (!ManualPageBreak && (mySize + yEndMsg <= yWithinMargins + yExtra) || // Don't Paginate if there is enough room, will fit on page - (mySize <= yWithinMargins + yExtra && SpecialCaseForRobinson())) + // F2023-015 check if on the first step of a sub-section that starts on its own page (separate pagination) + // Beaver Valley as two sub-sections that are printed continuously followed by a third sub-section printed separate. + // without this logic, the first step is printed at the same y-location as if it was on the previous page + bool sepPaginationForSubSection = false; + if (MyItemInfo.IsHigh && MyItemInfo.MyPrevious== null && MyItemInfo.MyActiveSection.IsSubsection) + { + if ((MyItemInfo.MyActiveSection.MyConfig as SectionConfig).Section_Pagination == SectionConfig.SectionPagination.Separate) + sepPaginationForSubSection = true; + } + if (!ManualPageBreak && ((mySize + yEndMsg <= yWithinMargins + yExtra) || // Don't Paginate if there is enough room, will fit on page + (mySize <= yWithinMargins + yExtra && SpecialCaseForRobinson())) && !sepPaginationForSubSection) //if (!ManualPageBreak && mySize + yEndMsg <= yWithinMargins + SixLinesPerInch) // Don't Paginate if there is enough room, will fit on page { // ooooo ooooo ooooo .oooooo..o o8o oooo oooo .o88o. o8o . diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index a5cfbe8d..1a8463fc 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1778,6 +1778,10 @@ namespace Volian.Print.Library //_MyLog.InfoFormat("NewPage 10 {0}", cb.PdfWriter.CurrentPageNumber); if (MyItemInfo.IsSection && MyParent != null && MyParent.MyItemInfo.IsSection && (MyItemInfo as SectionInfo).IsSeparatePagination()) { + // F2023-015 for Beaver Valley as two sub-sections that are printed continuously followed by a third sub-section printed + // with separate pagination. This section type uses a different pagelist for the pages after the first page. + // Needed to call ResetDocStyleAndValues to set the new page with the other pagelist sytle. + ResetDocStyleAndValues(ref yTopMargin, ref yBottomMargin); RefreshDocStyle(); yTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2018-003 fixed use of getting the active section // C2020-002 paper size is now set in the format files yBottomMargin = Math.Max(0, yTopMargin - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.PageLength); // C2018-003 fixed use of getting the active section