diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index e7953e1b..c0a747de 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -849,6 +849,20 @@ namespace Volian.Print.Library } else MyGrid.IsTooBig = true; + if (MyItemInfo.HasChangeBar && MyPageHelper.ChangeBarDefinition.MyChangeBarType != PrintChangeBar.Without) + { + foreach (vlnChangeBar vcb in MyPageHelper.MyChangeBars) + { + if (vcb.Height == heightBefore / MyPageHelper.YMultiplier - 4) + { + float heightDif = (heightBefore - heightAfter); + vcb.Height = heightAfter; + vcb.YChangeBarBottom += heightDif; + FixMessages(vcb, heightDif); + break; + } + } + } } MyPageHelper.BottomContent=yLocation-(MyGrid.Height + 4 * MyPageHelper.YMultiplier); float retval = Rtf2Pdf.GridAt(cb, MyGrid, XOffset, yLocation, Width, 100, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless")); @@ -860,6 +874,16 @@ namespace Volian.Print.Library return retval; } + private void FixMessages(vlnChangeBar vcb, float heightDif) + { + SortedDictionary msd = vcb.Messages; + vcb.Messages = new SortedDictionary(); + foreach (float key in msd.Keys) + { + vcb.Messages.Add(key+heightDif, msd[key]); + } + } + private float DrawText(PdfContentByte cb, ref float yPageStart, float yTopMargin, float yBottomMargin, ref float yLocation) { if(DebugText.IsOpen)DebugText.WriteLine("{0},'{1}','{2}','<>'", MyItemInfo.ItemID, MyItemInfo.DBSequence, FormattedText);