diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 8d9f0ab1..c0f65d29 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -224,6 +224,7 @@ namespace Volian.Print.Library // get { return _AddBlankPagesForDuplexPrinting; } // set { _AddBlankPagesForDuplexPrinting = value; } //} + private int _prevSectId = 0; public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document) { TableAdjustment = 0;// RHM20150525 - Table Scrunch @@ -290,7 +291,11 @@ namespace Volian.Print.Library { DrawCenterLine(writer.DirectContent, MySection.MyDocStyle.Layout.LeftMargin + MySection.MyDocStyle.CenterLineX ?? 0, MySection.MyDocStyle.CenterLineYTop ?? 0, MySection.MyDocStyle.CenterLineYBottom ?? 0); if (MySection.ActiveFormat.PlantFormat.FormatData.PrintData.WCNTraining) - DrawHorizontal(writer.DirectContent, (float)(MySection.ActiveFormat.PlantFormat.FormatData.SectData.SectionHeaderSeparatorLine.XStartPos ?? 0), (float)(MySection.ActiveFormat.PlantFormat.FormatData.SectData.SectionHeaderSeparatorLine.Length ?? 0), SectionSepLineYoffStart); + { + // only draw the line if this is a new section. + if (MySection.ItemID != _prevSectId) DrawHorizontal(writer.DirectContent, (float)(MySection.ActiveFormat.PlantFormat.FormatData.SectData.SectionHeaderSeparatorLine.XStartPos ?? 0), (float)(MySection.ActiveFormat.PlantFormat.FormatData.SectData.SectionHeaderSeparatorLine.Length ?? 0), SectionSepLineYoffStart); + _prevSectId = MySection.ItemID; + } } }