From af9ab49e1e656cd66058302f7772d911eff59b37 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 29 Sep 2011 14:39:55 +0000 Subject: [PATCH] --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 51fdc354..ed18c4d0 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -459,7 +459,10 @@ namespace Volian.Print.Library key = key + "." + MySection.ItemID; break; } - MyPdfContentByte.AddTemplate(MyPageCounts.AddToTemplateList(key, MyPdfWriter, args.MyText, args.MySvgText.Font, args.MySvgText.Align, args.MySvgText.FillColor), args.MySvgScale.X(args.MySvgText.X), args.MySvgScale.Y(MyPdfContentByte, args.MySvgText.Y)); + PdfTemplate tmp = MyPageCounts.AddToTemplateList(key, MyPdfWriter, args.MyText, args.MySvgText.Font, args.MySvgText.Align, args.MySvgText.FillColor); + // Proms page numbering designed requires a "{PAGE}" token to increment the page counter. So the easiest way + // to do that was to add a "{PAGE}" token to every page that is flagged as not to be printed. + if(!args.MyText.StartsWith("Non-printing ")) MyPdfContentByte.AddTemplate(tmp, args.MySvgScale.X(args.MySvgText.X), args.MySvgScale.Y(MyPdfContentByte, args.MySvgText.Y)); return string.Empty; } if (args.MyText.Contains("{FINALPAGE}")) @@ -512,6 +515,7 @@ namespace Volian.Print.Library private void AddPageListItems(Volian.Svg.Library.Svg mySvg, VEPROMS.CSLA.Library.PageStyle pageStyle, VEPROMS.CSLA.Library.SectionInfo section) { SvgGroup svgGroup = new SvgGroup(); + //int defPtPerRow = 72 / 6; //int curLPI = 6; // default //int prevLPI = 6; @@ -681,6 +685,10 @@ namespace Volian.Print.Library svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token)); } } + // Proms page numbering designed requires a "{PAGE}" token to increment the page counter. So the easiest way + // to do that was to add a "{PAGE}" token to every page that is flagged as not to be printed. + SvgText st = new SvgText(new System.Drawing.PointF(300, 300), "Non-printing {PAGE}", new System.Drawing.Font("Arial", 10), System.Drawing.Color.Black); + svgGroup.Add(st); mySvg.Add(svgGroup); }