Take a survey

Developing Applications Using APIs > Assembling PDF Documents > Understanding DDX > Using page elements > Scope of page elements

Scope of page elements
The following examples use the PageSize element to illustrate the concept of scope in DDX. The same principles apply to other page property and page content elements.
In the first example, the PageSize element is a child of the PDF result element. The scope of the PageSize element is its parent element. Therefore, it applies to the entire result document, and it affects all source documents that make up the result.
Example: Specifying a page property for the entire result document
<PDF result="doc1">
	<PageSize width="8.5in" height="11in"/>
	<PDF source="doc2"/>
	<PDF source="doc3"/>
	<PDF source="doc4"/>
</PDF>
The next example is equivalent to the previous one, even though the PageSize element appears after the PDF source elements. There can be only one PageSize element for any scope, and the order of this element relative to its siblings does not matter. (The order of the PDF source elements does matter because they specify the order of pages in the result document.)
Example: Specifying a page property for the entire result document
<PDF result="doc1">
	<PDF source="doc2"/>
	<PDF source="doc3"/>
	<PDF source="doc4"/>
	<PageSize width="8.5in" height="11in"/>
</PDF>
In the next example, an additional PageSize element appears as a child of the first PDF source element, creating a new scope. The properties specified by this PageSize element apply only to the pages in doc2, which will have a page size of 8.5 x 14 inches. doc3 and doc4 retain the page size specified by the PageSize element at the top level (8.5 x 11 inches).
Example: Overriding a page property at a lower scope
<PDF result="doc1">
	<PageSize width="8.5in" height="11in"/>
	<PDF source="doc2">
		<PageSize width="8.5in" height="14in"/>
	</PDF>
	<PDF source="doc3"/>
	<PDF source="doc4"/>
</PDF>
Note: The top-level scope is considered to be that of result elements that are direct children of the DDX element. For example, it is not legal in DDX to supply a PageSize element as a child of the DDX element with the intention of having it apply to all result documents.
The PDFGroup element can be used to create another level of scoping. See Grouping PDF sources for details.
For more information on how DDX elements affect the contents or properties of PDF pages, see Setting Page Properties, Adding and Manipulating Page Content, and Specifying Page Labels.

 

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/assemblePDFDDX_basics.95.12.html