ColdFusion 9.0 Resources |
Adding headers and footersTo add headers and footers to a PDF document, specify the Header and Footer elements in the DDX file. The following example specifies headers and footers for the PDF source called Doc2: <?xml version="1.0" encoding="UTF-8"?> <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd"> <PDF result="Out1"> <PDF source="Title"/> <TableOfContents/> <PDF source="Doc2" > <Header> <Right> <StyledText><p>Right-justified header text</p></StyledText> </Right> <Left> <StyledText><p>Left-justified header text</p></StyledText> </Left> </Header> <Footer> <Center> <StyledText><p>Centered Footer</p></StyledText> </Center> </Footer> </PDF> </PDF> </DDX> In this example, the Header and Footer elements apply only to Doc2 because they are contained within that PDF source start and end tags; they do not apply to the table of contents or to the title page, which precede the Header and Footer elements. |