From bb037ba06df2426c4ebb45c7ab802bce2e733661 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 28 May 2015 13:39:15 +0000 Subject: [PATCH] Fixed logic for Shrinking Tables where the Bottom message needs to be adjusted. --- PROMS/Volian.Print.Library/vlnParagraph.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index b066ee7c..948f06f6 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -934,9 +934,9 @@ namespace Volian.Print.Library // chk.SetRemoteGoto(ti.MyItemToID.MyProcedure.DisplayNumber.Replace("/", "_") + ".pdf", string.Format("ItemID={0}", ti.ToID)); // } // MyPageHelper.BottomContent = yLocation - Height; - // if (MyItemInfo.InList(39048)) Console.WriteLine("Here"); - retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin); - ProfileTimer.Pop(profileDepth); + //if (MyItemInfo.InList(39048)) Console.WriteLine("Here"); + retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin); + ProfileTimer.Pop(profileDepth); //} if (retval == 0) // problem occurred - paragraph was not able to be printed on page { // pagination logic needs to be fixed. @@ -2134,8 +2134,9 @@ namespace Volian.Print.Library { // Adjusted Continue Message Y Offset //DebugPagination.WriteLine("====>> {0},'{1}'", msg_yLocation, MyItemInfo.ShortPath); //msg_yLocation = (float) MyPageHelper.BottomContent - SixLinesPerInch; // Account for how low the lowest Item is on the page - msg_yLocation = Math.Min(yBottomMargin +(docstyle.Layout.FooterLength ?? 0),(float) MyPageHelper.BottomContent - SixLinesPerInch);// RHM20150525 - Table Scrunch - float msg_yLocationOld = yBottomMargin + (docstyle.Layout.FooterLength ?? 0); + float msg_yLocationOld =msg_yLocation= yBottomMargin + (docstyle.Layout.FooterLength ?? 0); + if (MyPageHelper.BottomContent != null) + msg_yLocation = Math.Min(yBottomMargin + (docstyle.Layout.FooterLength ?? 0), (float)MyPageHelper.BottomContent - SixLinesPerInch);// RHM20150525 - Table Scrunch if (msg_yLocationOld != msg_yLocation) _MyLog.WarnFormat("Continue Message Moved from {0} to {1} for {2}", msg_yLocationOld, msg_yLocation, this);// RHM20150525 - Table Scrunch }