include footnote size when pagination within step section logic

get max of bottom most of table for steps in table that have sibling steps
use ‘ParagraphToPdf’ (not ‘ToPdf’) for footnotes so that associated paragraphs don’t get referenced
This commit is contained in:
Kathy Ruffing 2015-03-03 17:28:22 +00:00
parent b9d517e160
commit 8b8176510f
3 changed files with 12 additions and 2 deletions

View File

@ -172,6 +172,12 @@ namespace Volian.Print.Library
KeepStepsOnPage = false; KeepStepsOnPage = false;
if (ySizeIncludingFirst == YSize) 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; 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)) if (ySizeIncludingFirstStep < yWithinMargins && ySizeIncludingFirst > yWithinMargins && yWithinMargins > (yPageSize/2))
ySizeIncludingFirst = ySizeIncludingFirstStep; ySizeIncludingFirst = ySizeIncludingFirstStep;
if (!KeepStepsOnPage && (ySizeIncludingFirst + ySectionEndMsg) > (yLocation - yBottomMargin) && !nearTheTop) if (!KeepStepsOnPage && (ySizeIncludingFirst + ySectionEndMsg) > (yLocation - yBottomMargin) && !nearTheTop)

View File

@ -618,7 +618,11 @@ namespace Volian.Print.Library
ntfn.YTopMost = yTopMargin - myYOff; ntfn.YTopMost = yTopMargin - myYOff;
ntfn.Processed = false; // process from here 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); myYOff -= (ntfn.Height); // - vlnPrintObject.SixLinesPerInch);
} }
NotesToFootNotes = null; NotesToFootNotes = null;

View File

@ -312,7 +312,7 @@ namespace Volian.Print.Library
} }
Add(para); Add(para);
if (didComponentTableRow && iChildItemInfo.Steps != null && iChildItemInfo.Steps.Count > 1) 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 // 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. // y offset for this caution that is printed BELOW the hls.