Fixed issue where the change bar on a table that is printed 7lpi is too long
This commit is contained in:
parent
e921bb1147
commit
9acaf34636
@ -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<float, vlnChangeBarMessage> msd = vcb.Messages;
|
||||
vcb.Messages = new SortedDictionary<float,vlnChangeBarMessage>();
|
||||
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}','<<END>>'", MyItemInfo.ItemID, MyItemInfo.DBSequence, FormattedText);
|
||||
|
Loading…
x
Reference in New Issue
Block a user