This commit is contained in:
@@ -54,7 +54,10 @@ namespace Volian.Print.Library
|
||||
{
|
||||
cnt++;
|
||||
string fstr = pct.Text.Replace("{OF}", _Total.ToString());
|
||||
|
||||
if (pct.Text.Contains("{TOCPAGE}"))
|
||||
{
|
||||
fstr = pct.Text.Replace("{TOCPAGE}", _Total.ToString());
|
||||
}
|
||||
if (fstr.Contains("{FINALPAGE}"))
|
||||
{
|
||||
fstr = fstr.Replace("{FINALPAGE}", (cnt == MyTemplates.Count) ? FinalPageMessage : "");
|
||||
@@ -95,6 +98,7 @@ namespace Volian.Print.Library
|
||||
Increment();
|
||||
PageCountTemplate retTemplate = new PageCountTemplate(pdfWriter, text.Replace("{PAGE}",Total.ToString()), myFont, alignment, color);
|
||||
MyTemplates.Add(retTemplate);
|
||||
|
||||
return retTemplate.MyTemplate;
|
||||
}
|
||||
}
|
||||
@@ -112,7 +116,11 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public PdfTemplate AddToTemplateList(string key, PdfWriter pdfWriter, string text, System.Drawing.Font myFont, int alignment, System.Drawing.Color color)
|
||||
{
|
||||
if (!this.ContainsKey(key)) this.Add(key, new PageCount());
|
||||
if (!this.ContainsKey(key))
|
||||
{
|
||||
this.Add(key, new PageCount());
|
||||
if (key.StartsWith("TOC")) this[key].CanIncrement = false;
|
||||
}
|
||||
return (this[key].AddToTemplateList(pdfWriter, text, myFont, alignment,color));
|
||||
}
|
||||
public PdfTemplate AddToTemplateList(string key, PdfWriter pdfWriter, string text, string finalPageMessage, System.Drawing.Font myFont, int alignment, System.Drawing.Color color)
|
||||
|
Reference in New Issue
Block a user