bug fix B2015-159 – fixed issue where a change bar on a step that was continued to next page, started printing in the page header
This commit is contained in:
parent
360bf5b4c3
commit
b173a28f32
@ -156,7 +156,17 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
||||||
{
|
{
|
||||||
|
float? topMost = null;
|
||||||
cb.SaveState();
|
cb.SaveState();
|
||||||
|
// for bug fix B2015-159
|
||||||
|
// Ginna reported an instance where a change bar started printing inside the page header box
|
||||||
|
// in their Abnornal procedures AP-SG.1 step 41.b RNO which continued onto the next page
|
||||||
|
// calculate a new starting position for the change bar
|
||||||
|
if (_MyParent is vlnParagraph)
|
||||||
|
{
|
||||||
|
vlnParagraph pgh = _MyParent as vlnParagraph;
|
||||||
|
topMost = cb.PdfWriter.PageSize.Height - (float)pgh.MyItemInfo.MyDocStyle.Layout.TopMargin;
|
||||||
|
}
|
||||||
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||||
PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer;
|
PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer;
|
||||||
if (textLayer != null) cb.BeginLayer(textLayer);
|
if (textLayer != null) cb.BeginLayer(textLayer);
|
||||||
@ -167,6 +177,10 @@ namespace Volian.Print.Library
|
|||||||
iTextSharp.text.Color changeBarColor = new iTextSharp.text.Color(PrintOverride.OverrideChangeBarColor(System.Drawing.Color.Black));
|
iTextSharp.text.Color changeBarColor = new iTextSharp.text.Color(PrintOverride.OverrideChangeBarColor(System.Drawing.Color.Black));
|
||||||
cb.SetColorStroke(changeBarColor);
|
cb.SetColorStroke(changeBarColor);
|
||||||
cb.SetLineWidth(.5F);
|
cb.SetLineWidth(.5F);
|
||||||
|
// for Bug Fix 2015-159
|
||||||
|
// reset the YOffset if up too high before printing the change bar
|
||||||
|
if (topMost != null)
|
||||||
|
YOffset = Math.Min(YOffset, (float)topMost);
|
||||||
cb.MoveTo(XOffset + xAdj, YOffset - yAdj); // combination yStart and YOffset
|
cb.MoveTo(XOffset + xAdj, YOffset - yAdj); // combination yStart and YOffset
|
||||||
cb.LineTo(XOffset + xAdj, YChangeBarBottomExtend - yAdj - 1);
|
cb.LineTo(XOffset + xAdj, YChangeBarBottomExtend - yAdj - 1);
|
||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user