This commit is contained in:
@@ -64,6 +64,7 @@ namespace Volian.Print.Library
|
||||
set
|
||||
{
|
||||
MyPageCounts = new PageCounts();
|
||||
MyTOCPageCounts = new PageCounts();
|
||||
_MyPdfWriter = value;
|
||||
}
|
||||
}
|
||||
@@ -96,6 +97,8 @@ namespace Volian.Print.Library
|
||||
DrawMessages(writer.DirectContent);
|
||||
if (!CreatingFoldoutPage)
|
||||
DrawRuler(writer.DirectContent);
|
||||
if ((MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0)
|
||||
CurrentTOCPageNumber++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -103,7 +106,8 @@ namespace Volian.Print.Library
|
||||
base.OnEndPage(writer, document);
|
||||
if (!CreatingFoldoutPage)
|
||||
DrawRuler(writer.DirectContent);
|
||||
|
||||
if ((MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountInTabOfCont) == 0)
|
||||
CurrentTOCPageNumber++;
|
||||
}
|
||||
YMultiplier = 1;
|
||||
}
|
||||
@@ -418,6 +422,7 @@ namespace Volian.Print.Library
|
||||
return mySvg;
|
||||
}
|
||||
public PageCounts MyPageCounts = null;
|
||||
public PageCounts MyTOCPageCounts = null;
|
||||
private static Regex regexFindToken = new Regex("{[^{}]*}");
|
||||
private string mySvg_ProcessText(object sender, SvgProcessTextArgs args)
|
||||
{
|
||||
@@ -434,6 +439,7 @@ namespace Volian.Print.Library
|
||||
MyPdfContentByte.AddTemplate(MyPageCounts.AddToTemplateList(key, MyPdfWriter, txt, 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;
|
||||
}
|
||||
string tocKey = "TOC" + MySection.ItemID.ToString();
|
||||
if (args.MyText.Contains("{PAGE}") || args.MyText.Contains("{OF}"))
|
||||
{
|
||||
#region numberingseq
|
||||
@@ -457,6 +463,7 @@ namespace Volian.Print.Library
|
||||
// default for the key is to make it NumberingSequence. Then handle
|
||||
// specific cases.
|
||||
string key = ((int)MySection.MyDocStyle.NumberingSequence).ToString();
|
||||
|
||||
E_NumberingSequence numseq = MySection.MyDocStyle.NumberingSequence??0;
|
||||
switch (numseq)
|
||||
{
|
||||
@@ -484,7 +491,7 @@ namespace Volian.Print.Library
|
||||
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));
|
||||
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}"))
|
||||
|
Reference in New Issue
Block a user