Take a survey

Developing Applications Using APIs > Assembling PDF Documents > Assembling and Disassembling PDF Documents > Specifying source documents > Grouping PDF sources

Grouping PDF sources
As described in Scope of page elements, page content, page property, and page label elements modify pages within their scope.
In the following example, there are three source documents. doc2 and doc3 are specified to have a page size of 8.5 x 14 inches. doc4 is specified to have a page size of 8.5 x 11 inches.
Example: Specifying different page sizes
<PDF result="doc1">
	<PDF source="doc2">
		<PageSize width="8.5in" height="14in"/>
	</PDF>
	<PDF source="doc3">
		<PageSize width="8.5in" height="14in"/>
	</PDF>
	<PDF source="doc4"
		<PageSize width="8.5in" height="11in"/>
	</PDF>
</PDF>
To avoid having to specify the same PageSize information multiple times, you can group the source elements to which it applies by using the PDFGroup element. The PDFGroup element provides its own scope that can include more than one source document.
Example: Using the PDFGroup element
<PDF result="doc1">
	<PDFGroup>
		<PageSize width="8.5in" height="14in"/>
		<PDF source="doc2"/>
		<PDF source="doc3"/>
	</PDFGroup>
	<PDF source="doc4"
		<PageSize width="8.5in" height="11in"/>
	</PDF>
</PDF>
The source documents doc2 and doc3 are in the PDFGroup element scope and therefore use all properties specified for that scope. They also inherit properties from higher scope that are not specified in the PDFGroup scope. In addition, individual source elements can have their own scope, providing properties that override those of the PDFGroup. (PDFGroup elements can also be nested.)
Example: Using the PDFGroup element
<PDF result="doc1">
	<PageSize width="8.5in" height="11in"/>
	<PDFGroup>
		<PageSize width="8.5in" height="14in"/>
		<PDF source="doc2"/>
		<PDF source="doc3">
			<PageSize width="11in" height="17in"/>
		</PDF>
		<PDF source=doc4"/>
	</PDFGroup>
	<PDF source="doc5"/>
</PDF>
In this example, the page size property from the PDFGroup scope (8.5 x 14 inches) applies to doc2 and doc4. doc3 overrides this by specifying its own page size (11 x 17 inches). doc5 inherits the page size from the top-level scope (8.5 x 11 inches).
PDFGroup elements are used solely for the purpose of grouping page elements that apply to a group of PDF pages. A PDFGroup element should not be thought of as representing a PDF document by itself. In particular, note the following points:
A PDFGroup element does not have independent page numbering (although it can specify page labels). If, for example, if you specify <BlankPage forceEven="true"/> within a PDFGroup element, a page is determined to be odd or even based on its position in the result document, not its position within the PDFGroup.

 

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/assemblePDFAssembling.96.6.html