Meta section printing: pagelist headers, page counts
Meta section printing: xoffset for sub/subsections, pagelist headers, page counts; start title page classification box
This commit is contained in:
parent
0fb3b78cf9
commit
cc927d1cd5
Binary file not shown.
Binary file not shown.
@ -1043,6 +1043,18 @@ namespace Volian.Print.Library
|
||||
/*
|
||||
* Check if tokens for handling page counts ({PAGE} {OF} etc). if so, do templates.
|
||||
*/
|
||||
if (args.MyText.Contains("{METACURPAGE}") || args.MyText.Contains("{METATOTPAGE}"))
|
||||
{
|
||||
ItemInfo top = MySection;
|
||||
while (top.MyParent != null && !top.MyParent.IsProcedure)
|
||||
{
|
||||
top = top.MyParent;
|
||||
}
|
||||
string key = "DocCurPage." + top.ItemID;
|
||||
string txt = args.MyText.Replace("{METACURPAGE}", "{PAGE}").Replace("{METATOTPAGE}", "{OF}");
|
||||
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;
|
||||
}
|
||||
if (args.MyText.Contains("{DOCCURPAGE}") || args.MyText.Contains("{DOCTOTPAGE}"))
|
||||
{
|
||||
string key = "DocCurPage." + MySection.ItemID;
|
||||
@ -1655,10 +1667,18 @@ namespace Volian.Print.Library
|
||||
plstr = plstr.Replace(token, "");
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
|
||||
break;
|
||||
case "{METASECTIONTITLE}":
|
||||
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current)
|
||||
case "[METASECTIONTITLE]":
|
||||
if (section.MyParent.IsSection)
|
||||
plstr = SplitTitle(svgGroup, pageItem, section.MyParent.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr);
|
||||
{
|
||||
// get top most section:
|
||||
ItemInfo top = section;
|
||||
while (top.MyParent != null && !top.MyParent.IsProcedure)
|
||||
{
|
||||
top = top.MyParent;
|
||||
}
|
||||
plstr = SplitTitle(svgGroup, pageItem, top.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr);
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
break;
|
||||
@ -1668,10 +1688,18 @@ namespace Volian.Print.Library
|
||||
_sectLevelNumTtlDiff = (int)pageItem.Row;
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber)));
|
||||
break;
|
||||
case "{METASECTIONNUMBER}":
|
||||
case "{METASECTIONNUMBER}": // This will print the top level section number
|
||||
case "[METASECTIONNUMBER]":
|
||||
if (section.MyParent.IsSection)
|
||||
plstr = plstr.Replace(token, section.MyParent.DisplayNumber);
|
||||
{
|
||||
// get top most section:
|
||||
ItemInfo top = section;
|
||||
while (top.MyParent != null && !top.MyParent.IsProcedure)
|
||||
{
|
||||
top = top.MyParent;
|
||||
}
|
||||
plstr = plstr.Replace(token, top.DisplayNumber);
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user