Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfdocument header bug?

Explorer ,
Sep 19, 2008 Sep 19, 2008
Is this a bug?

cfdocumentsection is supposed to have their own header and footer. This example mimics one in the documentation. I loop through a simple counter from 1 to 4 and name each page, header and footer with the loop number. But if you run this simple code, 4 pages of a PDF will be created, the pages will be 1 to 4, but every pages' header and footer will say "5" on it..



<cfdocument pagetype="letter"
format="pdf"
filename="#variables.filePath#" overwrite="true"
>
<cfloop index="ctr" from="1" to="4">
<cfdocumentsection>
<cfoutput><h1>Page #ctr#</h1></cfoutput>
<cfdocumentitem type="header">
<cfoutput>Header #ctr#</cfoutput>
</cfdocumentitem>
<cfdocumentitem type="footer">
<cfoutput>Footer #ctr#</cfoutput>
</cfdocumentitem>
</cfdocumentsection>
</cfloop>
</cfdocument>
369
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Sep 19, 2008 Sep 19, 2008
I ran the code with CF 8,0,1,195765 and 7,0,2,142559. The header and footers generated correctly for me (1,2,3,4).
Translate
Valorous Hero ,
Sep 19, 2008 Sep 19, 2008
I ran the code with CF 8,0,1,195765 and 7,0,2,142559. The header and footers generated correctly for me (1,2,3,4).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 19, 2008 Sep 19, 2008
Thanks for checking that... I guess I need to upgrade!
I am running CF 8,0,0,176276

Will post back the results..
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 19, 2008 Sep 19, 2008
Success! Upgrading to 8.0.1 fixed the header/footer issue.
It also seems to have really helped the layout stability of the pdf as well. Before the scaling was unpredictable and changed for each page.

Looks much better now, thanks!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 19, 2008 Sep 19, 2008
LATEST
Great. Thanks for posting the resolution!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources