diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index d4065b4c..22fa4b20 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -1352,8 +1352,11 @@ namespace Volian.Print.Library // code was not putting a page break on a step that needed to break, i.e. PageBreakOnStep = true. if ((MyItemInfo.IsStep && !MyItemInfo.FormatStepData.PageBreakOnStep) && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression) { - float ySpaceAt7LPI = (ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter + yEndMsg)) * SixLinesPerInch / _SevenLinesPerInch; - if ((YSize - yTop) > (ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter + yEndMsg)) + float adjustedCurPageYSpace = ySpaceOnCurPage; + if (MyPageHelper.PrintedSectionPage > 0 && MyItemInfo.ActiveSection != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst) + adjustedCurPageYSpace -= MyPageHelper.PrintedSectionPage; //B2020-064 FNP-1-ECP-0.0 Attachment 6 not enough room for end message + float ySpaceAt7LPI = (adjustedCurPageYSpace - (accountForCalvertAlarmConditionResponseFooter + yEndMsg)) * SixLinesPerInch / _SevenLinesPerInch; + if ((YSize - yTop) > (adjustedCurPageYSpace - (accountForCalvertAlarmConditionResponseFooter + yEndMsg)) && (YSize - yTop) < ySpaceAt7LPI ) { // Compress Rest of Step