Hi,
I'm on a process booklet in PDF. I have a Cover-Page, a TOC-Page and also the Content-Pages.
For every Section, I call the same function to build the header and footer like this:
Cover-Page:
p_Output.BeginSection(true, Constants.SECTION_COVER); setReport_Header_Footer(p_Output,p_Model.Name(nLocale));
TOC-Page:
p_Output.BeginSection(true, Constants.SECTION_INDEX); setReport_Header_Footer(p_Output,p_Model.Name(nLocale));
Content-Page:
p_Output.BeginSection(true,Constants.SECTION_DEFAULT ); setReport_Header_Footer(p_Output,p_Model.Name(nLocale));
But the Output has two Problems:
1. All pages have lines in the Table of Header and Footer, exept the TOC page. There are no Borders. Why?
2. Cover- and TOC-Page are showing page 1 from 1 when I use "Constants.FIELD_PAGE" and "Constants.FIELD_NUMPAGES" only the Content-Section works nearly fine. The Section begins to count from 1. In the help --> Method "BeginSection", I found the Note "In Pdf the SECTION_COVER and the SECTION_INDEX creates respectively a new Document". Is this the Problem? Any Workarounds? How can I read the Section-Name later to remove page-number on the Cover- and TOC-Section?
Regards,
Dominik
Hi,
You have to make the Header and the Footer just once, in my script I make :
Header( Mod ); Footer(); CoverPage( Mod );
After, I create the TOC section and the default section.
If you want the header and footer in your section( or not) you can change the 1st parameter in the method "BeginSection( true / false ,.. ). So in my script I make the Header and footer at start and after I choose if I want to show them or not.
But I don't have the num page ( ex : "page 1 / 2" ) in the footer whereas I used this :
ooutfile.Output ( "page de ","Arial",10,noir,transparent,centrer ,0); ooutfile.OutputField ( Constants.FIELD_PAGE, "Arial", 10, transparent, transparent, centrer ); ooutfile.Output(" / ","Arial",10,noir,transparent,gauche ,0); ooutfile.OutputField ( Constants.FIELD_NUMPAGES, "Arial", 10, transparent, transparent, centrer );
Do you know how i can have the num page?
Hi,
Thanks, your tip solves problem 1 and reduces the count of lines ;-)
I use exactly the same functions as you for the page-count.
outfile.Output("Seite ", "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER, 0); outfile.OutputField(Constants.FIELD_PAGE, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER); outfile.Output(" von ", "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER, 0); outfile.OutputField(Constants.FIELD_NUMPAGES, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER);
I only have the problem, that the FIELD_NUMPAGES does not give the right value on the cover and the toc page. These pages will never be counted, and I guess that this is a bug.
Hi,
It's not a bug. Like you say and you read in the help for the method BeginsSection :
"..creates respectively a new Document"
these functions creates seperate pages. So your first page it's the Page after the TOC, in france we count document pages like that.
Best Regards