[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Using conditionals in <cfdocumentitem type="header">

Posted on 2011-05-09
Medium Priority
Last Modified: 2012-06-21
I don't seem to have an issue with running a conditional in the 'Footer':

<cfdocumentitem type="footer">
<cfif cfdocument.currentpagenumber neq 1>
	page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#

Open in new window

But if I run a conditional like this in <cfdocumentitem type="header"> it is totally ignored.  I have seen that this is an issue/bug in some of the articles I have read but wondered if anyone has come up with a solution for this.  It really shouldnt be this difficult.

Using: ColdFusion 9.0.1, Windows 2008R2, IIS 7

Thanks in advance
Question by:WebStalkers
  • 2
  • 2
LVL 52

Accepted Solution

_agx_ earned 2000 total points
ID: 35723549
You're missing an attribute

<cfdocument format="pdf">
      <cfdocumentitem type="header" evalAtPrint="true">
      <cfif cfdocument.currentpagenumber neq 1>
            <cfoutput>page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput>
      <cfdocumentitem type="pagebreak"/>

Author Comment

ID: 35723609

I didn't see that anywhere in the articles I have been looking at. That seems to have solved it.
Thank you so much!  This has been driving me nuts.
LVL 52

Expert Comment

ID: 35723640
Add a comment to adobe's online docs.  I'm sure it'll save somebody's sanity ;-)

Author Comment

ID: 35724200
Good idea..will do!

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question