diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index c7a97a4b..ff60a07c 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -11,9 +11,27 @@ using VEPROMS.CSLA.Library; namespace Volian.Print.Library { - public class VlnSvgPageHelper:SvgPageHelper { + // This handles Page Breaks within a Step + private List _ParaBreaks = new List(); + public List ParaBreaks + { + get { return _ParaBreaks; } + set { _ParaBreaks = value; } + } + private VlnDestinations _VlnDestinations = new VlnDestinations(); + public VlnDestinations VlnDestinations + { + get { return _VlnDestinations; } + set { _VlnDestinations = value; } + } + private PdfOutline _MyPdfOutline = null; + public PdfOutline MyPdfOutline + { + get { return _MyPdfOutline; } + set { _MyPdfOutline = value; } + } private vlnText _TopMessage; public vlnText TopMessage { @@ -72,9 +90,17 @@ namespace Volian.Print.Library if (MySectionTitle != null) { PdfDestination dest = new PdfDestination(PdfDestination.FIT); - PdfOutline outline = new PdfOutline(writer.DirectContent.RootOutline, dest, MySectionTitle, false); + MyPdfOutline = new PdfOutline(writer.DirectContent.RootOutline, dest, MySectionTitle, false); MySectionTitle = null; } + if (VlnDestinations.Count > 0 && MyPdfOutline != null) + { + foreach (VlnDestination vd in VlnDestinations) + { + new PdfOutline(MyPdfOutline, vd.PdfDestination, vd.Title, false); + } + VlnDestinations.Clear(); + } } private void DrawMessages(PdfContentByte cb) { @@ -539,6 +565,36 @@ namespace Volian.Print.Library return ""; } } + public class VlnDestinations : List + { + public VlnDestinations() : base() + { + } + public void Add(string title, PdfDestination pdfDestination) + { + Add(new VlnDestination(title, pdfDestination)); + } + } + public class VlnDestination + { + private string _Title; + public string Title + { + get { return _Title; } + set { _Title = value; } + } + private PdfDestination _PdfDestination; + public PdfDestination PdfDestination + { + get { return _PdfDestination; } + set { _PdfDestination = value; } + } + public VlnDestination(string title, PdfDestination pdfDestination) + { + _Title = title; + _PdfDestination = pdfDestination; + } + } public class ChangeBarDefinition // anything that is section level should go in here. { private PrintChangeBar _MyChangeBarType; diff --git a/PROMS/Volian.Print.Library/vlnPrintObject.cs b/PROMS/Volian.Print.Library/vlnPrintObject.cs index e463f2aa..38f19c4b 100644 --- a/PROMS/Volian.Print.Library/vlnPrintObject.cs +++ b/PROMS/Volian.Print.Library/vlnPrintObject.cs @@ -294,6 +294,8 @@ namespace Volian.Print.Library cb.EndLayer(); cb.RestoreState(); } + public virtual float YBottom + { get { return YOffset + Height;} } } public partial class vlnPrintObjects : List {