Take a survey

Developing Applications Using APIs > Assembling PDF Documents > Understanding DDX > Input and output

Input and output
When you invoke the Assembler service using the client interface, you provide the following information:
One or more input data streams. These data streams, which represent PDF and other input types, are mapped to names that appear in source elements in the DDX document.
Note: A source name (for PDF elements only) can be mapped to a single data stream or to an ordered list of streams. The relationship between source names and streams is described in detail in Specifying multiple input streams.
See Programmatically Assembling PDF Documents for details about specifying the source documents programmatically.
After it processes the DDX document, the Assembler service returns one or more data streams (unless it throws an exception). These data streams are mapped to the names specified by result attributes of result elements in the DDX document. See Programmatically Assembling PDF Documents for programmatic details.
There is no relationship between source names and the names of files. Likewise, result names mapped to output data streams are not related to file names. In fact, the result names may not even be valid file names, particularly in the case of the PDFsFromBookmarks element, which generates names based on bookmarks. (See Disassembling PDF documents.)
Therefore, names used in DDX may be generic names, which enables you to reuse the DDX with varying sets of data. You use the client interface to specify where the source data originates and where the results are stored. For more information, see Programmatically Assembling PDF Documents.
Note: Using file extensions such as .pdf for source or result attributes is not necessary but can be useful for clarity.
In particular, the original files that provided the input data streams are not modified unless you explicitly overwrite them using the client interface. In the following example, the input stream doc1 has no relationship with the result doc1. Also, if a subsequent PDF source element refers to doc1, the original source for doc1 will be used.
Example: Using the same name for source and result
<PDF result="doc1">
	<PDF source="doc1"/>
	<PDF source="doc2"/>
</PDF>
Note: Having a result and source with the same name can affect which source document is treated as the base document (see About base documents).
Input data streams are not returned to the client and are not considered to be modified at any time within a result element. Therefore, if a result element contains multiple references to the same source, each instance refers to the original input data. The following example would concatenate two copies of doc2 and return them as doc1.
Example: Specifying a source document twice
<PDF result="doc1">
	<PDF source="doc2"/>
	<PDF source="doc2"/>
</PDF>
Note: A typical reason to list the same source document more than once is when specifying different page ranges for each one. See Page ranges.

 

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.10.html