From 8b8176510f78b9a2b67834b80f7d18ed4cdebd5c Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 3 Mar 2015 17:28:22 +0000 Subject: [PATCH] =?UTF-8?q?include=20footnote=20size=20when=20pagination?= =?UTF-8?q?=20within=20step=20section=20logic=20get=20max=20of=20bottom=20?= =?UTF-8?q?most=20of=20table=20for=20steps=20in=20table=20that=20have=20si?= =?UTF-8?q?bling=20steps=20use=20=E2=80=98ParagraphToPdf=E2=80=99=20(not?= =?UTF-8?q?=20=E2=80=98ToPdf=E2=80=99)=20for=20footnotes=20so=20that=20ass?= =?UTF-8?q?ociated=20paragraphs=20don=E2=80=99t=20get=20referenced?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/Pagination.cs | 6 ++++++ PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 6 +++++- PROMS/Volian.Print.Library/vlnParagraph.cs | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 8e4b02a4..130e6e77 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -172,6 +172,12 @@ namespace Volian.Print.Library KeepStepsOnPage = false; if (ySizeIncludingFirst == YSize) KeepStepsOnPage = false; float ySectionEndMsg = !_skipEndMessage && MyItemInfo.IsSection && MyItemInfo.Steps != null && MyItemInfo.Steps.Count == 1 && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0; + if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) + { + float vpHeight = SixLinesPerInch; + foreach (vlnParagraph vp in MyPageHelper.NotesToFootNotes) vpHeight += vp.Height; + ySectionEndMsg += vpHeight; + } if (ySizeIncludingFirstStep < yWithinMargins && ySizeIncludingFirst > yWithinMargins && yWithinMargins > (yPageSize/2)) ySizeIncludingFirst = ySizeIncludingFirstStep; if (!KeepStepsOnPage && (ySizeIncludingFirst + ySectionEndMsg) > (yLocation - yBottomMargin) && !nearTheTop) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 7d7ea556..ca506c30 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -618,7 +618,11 @@ namespace Volian.Print.Library ntfn.YTopMost = yTopMargin - myYOff; ntfn.Processed = false; // process from here - ntfn.ToPdf(cb, yTopMargin, ref yTopMargin, ref tmp); + // Only use ParagraphToPdf for printing of a single step. + // This is assuming that footnotes do not have child steps. + ntfn.ParagraphToPdf(cb, yTopMargin, yTopMargin, tmp); + //ntfn.ToPdf(cb, yTopMargin, ref yTopMargin, ref tmp); + myYOff -= (ntfn.Height); // - vlnPrintObject.SixLinesPerInch); } NotesToFootNotes = null; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index b9e69c0a..0ca42bb5 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -312,7 +312,7 @@ namespace Volian.Print.Library } Add(para); if (didComponentTableRow && iChildItemInfo.Steps != null && iChildItemInfo.Steps.Count > 1) - tableBottomMost = AddComponentTableSiblings(cb, iChildItemInfo.Steps[1], xoff, para.YBottomMost, rnoLevel, maxRNO, formatInfo, yoffRight, pp); + tableBottomMost = Math.Max(tableBottomMost, AddComponentTableSiblings(cb, iChildItemInfo.Steps[1], xoff, para.YBottomMost, rnoLevel, maxRNO, formatInfo, yoffRight, pp)); // Calvert Alarm's caution1 is the Annunciator window, i.e. in top right of page. Adjust // y offset for this caution that is printed BELOW the hls.