Changing the size of a footer in CFDOCUMENT

This post is more than 2 years old.

Over on the BACFUG mailing list, a user asked:

Is there a way to adjust the size of the footer in a PDF created with cfdocument? I'd like to put a table in the footer but it needs to be taller than the default size. I can put the table in the content of the document but it needs to be at the bottom of the page anyway, so I'm hoping there's some sneaky way to change the footer size that I haven't found yet.

I double checked the docs and didn't see anything that directly addressed this, so my first instinct was to look at DDX. I've blogged about how cool DDX is so it's one of the first things I check when working on a cfdocument/cfpdf issue. I did some digging and it looks like you can simply specify a larger size for the font of the footer. As an example: <DDX xmlns="" xmlns:xsi="" xsi:schemaLocation=" coldfusion_ddx.xsd"> <StyleProfile name="bookFooter"> <Footer> <Right> <StyledText> <p color="blue" font-size="28pt">Page <_PageNumber/> of <_LastPageNumber/></p> </StyledText> </Right> </Footer> </StyleProfile>
 &lt;PDF result="preview"&gt;
    &lt;PDF source="doc1"&gt;
       &lt;Footer styleReference="bookFooter" /&gt;


I specified a font-size of 28, which is rather large. You could modify that though until you get the desired effect. You can also specify the margin on the footer to give it more space.

DDX - bringing the sexy back to PDF (if that is even possible ;).

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA