diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 602c20e4..ccbf2732 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -461,16 +461,19 @@ namespace Volian.Print.Library , MyItemInfo.ItemID, MyItemInfo.MyDocVersion.MyFolder.Name, MyItemInfo.ShortPath); break; } - // if first condition/response and the parent has caution, notes or warnings then move the break to the caution, note or warning - if (paraBreak.ParentHasCalvertMacro && paraBreak.MyParent.HasCalvertMacro && paraBreak.MyItemInfo.MyPrevious == null && paraBreak.MyParent.ChildrenAbove.Count > 0) + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) // only do the following for Calvert Alarms { - paraBreak = paraBreak.MyParent.ChildrenAbove[0]; - } - // If the lastbreak was part of a condition response and the location is part of a condition response account for the size of the footer. - if (lastBreak != null && lastBreak.ParentHasCalvertMacro && paraBreak.ParentHasCalvertMacro) - { - paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - 12 * 4, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace, - myBottomMsgSpace,MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly); + // if first condition/response and the parent has caution, notes or warnings then move the break to the caution, note or warning + if (paraBreak.ParentHasCalvertMacro && paraBreak.MyParent.HasCalvertMacro && paraBreak.MyItemInfo.MyPrevious == null && paraBreak.MyParent.ChildrenAbove.Count > 0) + { + paraBreak = paraBreak.MyParent.ChildrenAbove[0]; + } + // If the lastbreak was part of a condition response and the location is part of a condition response account for the size of the footer. + if (lastBreak != null && lastBreak.ParentHasCalvertMacro && paraBreak.ParentHasCalvertMacro) + { + paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - 12 * 4, yLowerLimit, myList, paraBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace, + myBottomMsgSpace, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly); + } } if (lastBreak == paraBreak) { diff --git a/PROMS/Volian.Print.Library/Rtf2Pdf.cs b/PROMS/Volian.Print.Library/Rtf2Pdf.cs index 1c61b355..d267b2a3 100644 --- a/PROMS/Volian.Print.Library/Rtf2Pdf.cs +++ b/PROMS/Volian.Print.Library/Rtf2Pdf.cs @@ -81,7 +81,12 @@ namespace Volian.Print.Library } private static int NextTextAtCounter { - get { return ++TextAtCounter; } + get + { + int retval = ++TextAtCounter; + //if (InList(retval, 461)) Console.WriteLine("TextAt {0}", retval); + return retval; + } } public static float TextAt(PdfContentByte cb, Paragraph iParagraph, float x, float y, float width, float height, string debugText, float yBottomMargin) {