diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 84c9161d..34d6ecd8 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1917,7 +1917,6 @@ namespace VEPROMS { infotabTransition.Visible = false; infotabRO.Visible = true; - //displayRO.Mydvi = args.MyItemInfo.MyDocVersion; displayRO.MyROFST = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; displayRO.MyRTB = null; infotabTags.Visible = false; diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 6a08631b..9a6c9594 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -233,6 +233,12 @@ namespace Volian.Print.Library Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, true); if (sectSvg != null) MySvg = sectSvg; } + private float? _YTopMargin = null; + public float? YTopMargin + { + get { return _YTopMargin; } + set { _YTopMargin = value; } + } private void DrawRuler(PdfContentByte cb) { if (DebugLayer == null) return; @@ -243,6 +249,7 @@ namespace Volian.Print.Library cb.SetLineWidth(.1F); cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue)); float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin); + if(YTopMargin != null) yTop = (float)YTopMargin; float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength)); //Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom); cb.MoveTo(x, yTop); @@ -272,7 +279,7 @@ namespace Volian.Print.Library cb.Stroke(); } cb.SetLineWidth(.1F); - cb.Rectangle((float)layout.LeftMargin, (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin), (float)layout.PageWidth - (float)layout.LeftMargin, (float)-layout.PageLength); + cb.Rectangle((float)layout.LeftMargin, yTop, (float)layout.PageWidth - (float)layout.LeftMargin, yBottom - yTop); float yRuler = 612; cb.MoveTo(0, yRuler); cb.LineTo(612, yRuler); @@ -404,6 +411,7 @@ namespace Volian.Print.Library forceLoadSvg = ResetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this) Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg); if (sectSvg != null) MySvg = sectSvg; + _YTopMargin = null; } } private string _MySectionTitle; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index fe346e96..11517570 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -759,7 +759,8 @@ namespace Volian.Print.Library if ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst) { yTopMargin = _PointsPerPage - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.TopMargin + MyPageHelper.PrintedSectionPage; - yBottomMargin = Math.Max(0, yTopMargin - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.PageLength); + MyPageHelper.YTopMargin = yTopMargin; + yBottomMargin = Math.Max(0, _PointsPerPage - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.TopMargin - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.PageLength); } }