Pagen Numbering Tokens

Pagen Numbering Tokens

Forum member · May 31, 2006
Hello, it seems like tokens in the text of PageNumberingLabel are not substituted with values. I noticed that in my appplication and tried to run small example from help library. The result was the same. Here's piece of code from your help file: static void Main() { // Create a PDF Document Document document = new Document(); //Create a template object and add a page numbering label Template template = new Template(); template.Elements.Add(new PageNumberingLabel("!UNRECOGNISED ELEMENT TYPE '/SP'! of !UNRECOGNISED ELEMENT TYPE 'ST'!", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center)); document.Template = template; //Begin the first section document.Sections.Begin(NumberingStyle.RomanLowerCase); //Add two pages document.Pages.Add(new Page()); //Page 1 document.Pages.Add(new Page()); //Page 2 //Begin the second section document.Sections.Begin(NumberingStyle.Numeric, template); //Add three pages document.Pages.Add(new Page()); //Page 3 document.Pages.Add(new Page()); //page 4 document.Pages.Add(new Page()); //page 5 //Begin the third section specifying a section prefix document.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - "); //Add two pages document.Pages.Add(new Page()); //page 6 document.Pages.Add(new Page()); //page 7 // Save the PDF document document.Draw(@"C:\MyDocument.pdf"); Thanks, Artyom.

Re: Pagen Numbering Tokens

Support · May 31, 2006
Hello Artyom, Thanks for pointing this out. We will get this resolved in the next minor release of the Help Documentation. Here is the actual working code: static void Main() { // Create a PDF Document Document document = new Document(); //Create a template object and add a page numbering label Template template = new Template(); template.Elements.Add(new PageNumberingLabel("%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center)); document.Template = template; //Begin the first section document.Sections.Begin(NumberingStyle.RomanLowerCase); //Add two pages document.Pages.Add(new Page()); //Page 1 document.Pages.Add(new Page()); //Page 2 //Begin the second section document.Sections.Begin(NumberingStyle.Numeric, template); //Add three pages document.Pages.Add(new Page()); //Page 3 document.Pages.Add(new Page()); //page 4 document.Pages.Add(new Page()); //page 5 //Begin the third section specifying a section prefix document.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - "); //Add two pages document.Pages.Add(new Page()); //page 6 document.Pages.Add(new Page()); //page 7 // Save the PDF document document.Draw(@"C:\MyDocument.pdf"); Thanks, ceTe Software Support Team

Re: Pagen Numbering Tokens

Forum member · Aug 15, 2006
I fall over this documentation error too. You talked about a minor update for the help file. Now it is August - 4 month later. Calle

Re: Pagen Numbering Tokens

Support · Aug 15, 2006
Hi Calle, Please refer to the above code for clarification on this. We have not yet released our next minor version 4.0.1 that will address this. Thanks, ceTe Software Support Team