Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 951

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Adding headers and footers
To add headers and footers to a PDF document, specify 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
source start and end tags; they do not apply to the table of contents or to the title page, which precede the
elements.
Footer
Formatting headers and footers
You use DDX instructions to perform the following tasks:
• Add automatic page numbers to headers and footers
• Use style profiles
• Group documents in the PDF output file
Adding automatic page numbers
To add automatic page numbers, use the
elements. The following code shows how to create footers with right-justified automatic page numbers:
Footer
<Footer>
<Right>
<StyledText>
<p>Page <_PageNumber/> of <_LastPageNumber/></p>
</StyledText>
</Right>
</Footer>
The first page of the output file is numbered "Page 1 of n", and so on.
For more information on built-in keys, see the Adobe LiveCycle Assembler Document Description XML Reference.
and
elements apply only to Doc2 because they are contained within that PDF
Footer
and
_PageNumber
Last updated 1/20/2012
and
elements in the DDX file. The
Header
Footer
built-in keys within the
_LastPagenumber
946
and
Header
or
Header

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents