Take a survey

Developing Applications Using APIs > Assembling PDF Documents > Specifying Page Labels > About page labels > Specifying page labels

Specifying page labels
This example assembles three PDF documents that have two pages each. Because the PageLabel element is specified separately for each source document, numbering begins at "1" for each document. This is equivalent to the start attribute being set to 1, its default value.
Example: Specifying the page label separately for each source document
<PDF result="doc4">
	<PDF source="doc1">
		<PageLabel prefix="Chapter 1 - "/>
	</PDF>
	<PDF source="doc2">
		<PageLabel prefix="Chapter 2 - "/>
	</PDF>
	<PDF source="doc3">
		<PageLabel prefix="Appendix A - "/>
	</PDF>
</PDF>
The resulting page numbers and labels are shown in the following table.
 
 
 
In the next example, the PageLabel element is a child of the PDF result element. Therefore, the page label style, with the prefix "page ", applies to the entire result document. The page number starts with 1 and increments throughout the document.
Example: Applying a page label style to an entire document
<PDF result="doc4">
	<PageLabel prefix="page "/>
	<PDF source="doc1"/>
	<PDF source="doc2"/>
	<PDF source="doc3"/>
</PDF>
The resulting page numbers and labels are shown in the following table.
 
This example produces the same result as the previous one. It specifies the page label style for the first source document and indicates that the remaining source documents should continue the same style.
Example: Continuing a page label style
<PDF result="doc4">
	<PDF source="doc1">
		<PageLabel prefix="page "/>
	</PDF>
	<PDFGroup>
		<PageLabel mode="Continue"/>
		<PDF source="doc2"/>
		<PDF source="doc3"/>
	</PDFGroup>
</PDF>
The following examples illustrate several page labeling options using the same assembled documents. The source documents are a title page, two content sections, and an advertising supplement inserted between the two sections.
Some of the documents contain page labels prior to assembly. The third column in the table below shows how those page labels would have been specified using attributes of the PageLabel element.
 
 
 
format="None" prefix="Title page"
format="Decimal" prefix="Ad - "
In the first example, the goal is to number FirstHalf and SecondHalf consecutively and number AdSection independently. To accomplish this, the PageLabel element that is a child of the PDF result defines a global page label format, which applies only to the pages in FirstHalf and SecondHalf. Those pages start with "1" (by default) and are numbered consecutively, ignoring any intervening pages in a lower scope. The PageLabel elements in Title and AdSection apply only to those source documents and are defined to preserve the original page labels.
Example: Overriding a global page label format
<PDF result="doc1">
	<PageLabel format="Decimal"/>
	<PDF source="Title">
		<PageLabel mode="Preserve"/>
	</PDF>
	<PDF source="FirstHalf"/>
	<PDF source="AdSection">
		<PageLabel mode="Preserve"/>
	</PDF>
	<PDF source="SecondHalf"/>
</PDF>
 
The next example uses the same documents and also preserves the page labels for Title and AdSection. However, there is no global page label format; therefore, the pages in FirstHalf and SecondHalf are given the ordinal page number as the page label.
Example: Inheriting the default page label
<PDF result="doc1">
	<PDF source="Title">
		<PageLabel mode="Preserve"/>
	</PDF>
	<PDF source="FirstHalf"/>
	<PDF source="AdSection">
		<PageLabel mode="Preserve"/>
	</PDF>
	<PDF source="SecondHalf"/>
</PDF>
 
More complicated page labeling can require using intermediate results. For example, to have labeling similar to the previous example but starting the numbering for FirstHalf with "1", use the following DDX.
Example: Using an intermediate result for page labels
<PDF result="TempDoc" return="false">
	<PDF source="FirstHalf"/>
	<PDF source="AdSection"/>
	<PDF source="SecondHalf"/>
</PDF>
<PDF result="doc3">
	<PDF source="Title"/>
	<PDF source="TempDoc"/>
</PDF>
In TempDoc, FirstHalf and SecondHalf are given default page labels starting with "1". Therefore, those page labels are preserved when assembling doc3.
 

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/assemblePDFPage_labels.104.3.html