Fix logic for FinalPage

This commit is contained in:
John Jenko 2011-09-28 13:32:51 +00:00
parent e314d24620
commit 0085091475

View File

@ -462,10 +462,13 @@ namespace Volian.Print.Library
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));
return string.Empty;
}
if (args.MyText.Contains("{FINALPAGE}") && MySection.ItemID == FinalMessageSectionID)
if (args.MyText.Contains("{FINALPAGE}"))
{
string key = "FinalPage";
MyPdfContentByte.AddTemplate(MyPageCounts.AddToTemplateList(key, MyPdfWriter, args.MyText,MySection.MyDocStyle.Final.Message, args.MySvgText.Font, args.MySvgText.Align, args.MySvgText.FillColor), args.MySvgScale.X(args.MySvgText.X), args.MySvgScale.Y(MyPdfContentByte, args.MySvgText.Y));
if (MySection.ItemID == FinalMessageSectionID)
{
string key = "FinalPage";
MyPdfContentByte.AddTemplate(MyPageCounts.AddToTemplateList(key, MyPdfWriter, args.MyText, MySection.MyDocStyle.Final.Message, args.MySvgText.Font, args.MySvgText.Align, args.MySvgText.FillColor), args.MySvgScale.X(args.MySvgText.X), args.MySvgScale.Y(MyPdfContentByte, args.MySvgText.Y));
}
return string.Empty;
}
return regexFindToken.Replace(args.MyText, new MatchEvaluator(ReplacePageListToken));