Removed commented code.
Corrected Bottom Margin calc associated with DSS_PrintSectOnFirst Corrected DrawRuler to support DSS_PrintSectOnFirst
This commit is contained in:
parent
efc5ed84c4
commit
1dd61e449d
@ -1917,7 +1917,6 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
infotabTransition.Visible = false;
|
infotabTransition.Visible = false;
|
||||||
infotabRO.Visible = true;
|
infotabRO.Visible = true;
|
||||||
//displayRO.Mydvi = args.MyItemInfo.MyDocVersion;
|
|
||||||
displayRO.MyROFST = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
displayRO.MyROFST = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
|
||||||
displayRO.MyRTB = null;
|
displayRO.MyRTB = null;
|
||||||
infotabTags.Visible = false;
|
infotabTags.Visible = false;
|
||||||
|
@ -233,6 +233,12 @@ namespace Volian.Print.Library
|
|||||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, true);
|
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, true);
|
||||||
if (sectSvg != null) MySvg = sectSvg;
|
if (sectSvg != null) MySvg = sectSvg;
|
||||||
}
|
}
|
||||||
|
private float? _YTopMargin = null;
|
||||||
|
public float? YTopMargin
|
||||||
|
{
|
||||||
|
get { return _YTopMargin; }
|
||||||
|
set { _YTopMargin = value; }
|
||||||
|
}
|
||||||
private void DrawRuler(PdfContentByte cb)
|
private void DrawRuler(PdfContentByte cb)
|
||||||
{
|
{
|
||||||
if (DebugLayer == null) return;
|
if (DebugLayer == null) return;
|
||||||
@ -243,6 +249,7 @@ namespace Volian.Print.Library
|
|||||||
cb.SetLineWidth(.1F);
|
cb.SetLineWidth(.1F);
|
||||||
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
|
cb.SetColorStroke(new Color(System.Drawing.Color.CornflowerBlue));
|
||||||
float yTop = (float)(cb.PdfWriter.PageSize.Height - layout.TopMargin);
|
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));
|
float yBottom = (float)(cb.PdfWriter.PageSize.Height - (layout.TopMargin + layout.PageLength));
|
||||||
//Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
|
//Console.WriteLine("'{0}',{1},{2}", MySection.MyDocStyle.Name, yTop, yBottom);
|
||||||
cb.MoveTo(x, yTop);
|
cb.MoveTo(x, yTop);
|
||||||
@ -272,7 +279,7 @@ namespace Volian.Print.Library
|
|||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
}
|
}
|
||||||
cb.SetLineWidth(.1F);
|
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;
|
float yRuler = 612;
|
||||||
cb.MoveTo(0, yRuler);
|
cb.MoveTo(0, yRuler);
|
||||||
cb.LineTo(612, 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)
|
forceLoadSvg = ResetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this)
|
||||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
|
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
|
||||||
if (sectSvg != null) MySvg = sectSvg;
|
if (sectSvg != null) MySvg = sectSvg;
|
||||||
|
_YTopMargin = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string _MySectionTitle;
|
private string _MySectionTitle;
|
||||||
|
@ -759,7 +759,8 @@ namespace Volian.Print.Library
|
|||||||
if ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst)
|
if ((MyItemInfo.MyActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst)
|
||||||
{
|
{
|
||||||
yTopMargin = _PointsPerPage - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.TopMargin + MyPageHelper.PrintedSectionPage;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user