This commit is contained in:
2010-07-22 14:22:53 +00:00
parent 458b3b4d63
commit 843677822d
5 changed files with 53 additions and 282 deletions

View File

@@ -56,15 +56,26 @@ namespace Volian.Print.Library
}
public override void OnCloseDocument(PdfWriter writer, iTextSharp.text.Document document)
{
AddBookmarks(writer);
MyPageCounts.DrawTemplates();
}
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
{
AddBookmarks(writer);
MyPageCounts.CanIncrement = true;
base.OnEndPage(writer, document);
DrawChangeBars(writer.DirectContent);
DrawMessages(writer.DirectContent);
}
private void AddBookmarks(PdfWriter writer)
{
if (MySectionTitle != null)
{
PdfDestination dest = new PdfDestination(PdfDestination.FIT);
PdfOutline outline = new PdfOutline(writer.DirectContent.RootOutline, dest, MySectionTitle, false);
MySectionTitle = null;
}
}
private void DrawMessages(PdfContentByte cb)
{
if (TopMessage != null)
@@ -114,9 +125,16 @@ namespace Volian.Print.Library
set
{
_MySection = value;
MySectionTitle = (_MySection.DisplayNumber == null ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
MySvg = BuildSvg(_MySection);
}
}
private string _MySectionTitle;
public string MySectionTitle
{
get { return _MySectionTitle; }
set { _MySectionTitle = value; }
}
private int _MaxRNO;
public int MaxRNO
{