Improved accounting for bottom continue messages for pagination

Bottom Message (below text) fix and pagination improvements
Include RNO separator in ‘BottomContent’ calculation
Reset ‘BottomContent’ for each page & added ruler for bottom of page
This commit is contained in:
2015-06-02 15:09:57 +00:00
parent 65bfcdb9b8
commit 06ba7bf825
4 changed files with 105 additions and 19 deletions

View File

@@ -241,7 +241,12 @@ namespace Volian.Print.Library
DrawChangeBars(writer.DirectContent);
DrawMessages(writer.DirectContent);
if (!CreatingFoldoutPage)
{
DrawRuler(writer.DirectContent);
float x = MySection == null ? 555 : (float)MySection.MyDocStyle.Layout.PageWidth;
DrawBottomRuler(writer.DirectContent, x / 2 - 144); //aer column
DrawBottomRuler(writer.DirectContent, x - 144); //rno column
}
}
else
{
@@ -308,11 +313,48 @@ namespace Volian.Print.Library
}
PageListTopCheckOffHeader = null;
PageListLastCheckOffHeader = null;
BottomContent = null;
YMultiplier = 1;
PrintedAPage = true;
ProfileTimer.Pop(profileDepth);
}
private void DrawBottomRuler(PdfContentByte cb, float x)
{
VlnSvgPageHelper myPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
if (myPageHelper.DebugLayer != null)
{
cb.BeginLayer(myPageHelper.DebugLayer);
cb.SaveState();
cb.SetLineWidth(.1F);
cb.SetColorStroke(new Color(System.Drawing.Color.Plum));
float height = 350;
float yTop = 350;
float yBottom = yTop - height;
cb.MoveTo(x, yTop);
cb.LineTo(x, yBottom);
if (myPageHelper.BottomContent != null)
{
cb.MoveTo(0, (float)myPageHelper.BottomContent);
cb.LineTo(792, (float)myPageHelper.BottomContent);
}
int i = 0;
for (float y = yBottom; y <= yTop; y += 10)
{
float w = 10;
if (i % 10 == 0) w = 30;
else if (i % 5 == 0) w = 20;
cb.SetLineWidth(w / 30);
i++;
cb.MoveTo(x + w, y);
cb.LineTo(x, y);
cb.Stroke();
}
i = 0;
cb.Stroke();
cb.RestoreState();
cb.EndLayer();
}
}
private void DrawVertical(PdfContentByte cb, float x, float top, float bottom)
{
cb.SaveState();