From 57a56eab9d994bc7c8d867697fb28d1488347eeb Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 4 Jun 2015 14:55:26 +0000 Subject: [PATCH] WCNTRN: do not draw horizontal section line on continued pages --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; + } } }