Take a survey

Developing Applications Using APIs > Creating Document Output Streams > Creating Multiple Output Files

Creating Multiple Output Files
The Output service can create separate files for each record within an XML data source or a single file that contains all records (this functionality is the default). For example, assume there are ten records located within an XML data source and you instructed the Output service to create separate PDF files for each record by using the Output API. As a result, the Output service generates ten PDF files. (Instead of creating files, you can also send multiple print streams to a printer. However, this section discusses creating multiple files.)
The following diagram shows the Output service processing an XML data file that contains multiple records. Assume that you instructed the Output service to create a separate PDF file for each data record. In this situation, the Output service generates a separate PDF file for each data record.
In contrast, the following diagram shows the Output service processing an XML data file that contains multiple records. Assume that you instructed the Output service to create a single PDF file that contains all data records. In this situation, the Output service generates one file that contains all of the records.
The following XML data shows an example of a data file containing three data records.
<?xml version="1.0" encoding="UTF-8"?>
<batch>
<LoanRecord>
	<mortgageAmount>500000</mortgageAmount>
	<lastName>Blue</lastName>
	<firstName>Tony</firstName>
	<SSN>555666777</SSN>
	<PositionTitle>Product Manager</PositionTitle>
	<Address>555 No Where Dr</Address>
	<City>New York</City>
	<StateProv>New York</StateProv>
	<ZipCode>51256</ZipCode>
	<Email>TBlue@NoMailServer.com</Email>
	<PhoneNum>555-7418</PhoneNum>
	<FaxNum>555-9981</FaxNum>
	<Description>Buy a home</Description>
</LoanRecord>
<LoanRecord>
	<mortgageAmount>300000</mortgageAmount>
	<lastName>White</lastName>
	<firstName>Sam</firstName>
	<SSN>555666222</SSN>
	<PositionTitle>Program Manager</PositionTitle>
	<Address>557 No Where Dr</Address>
	<City>New York</City>
	<StateProv>New York</StateProv>
	<ZipCode>51256</ZipCode>
	<Email>SWhite@NoMailServer.com</Email>
	<PhoneNum>555-7445</PhoneNum>
	<FaxNum>555-9986</FaxNum>
	<Description>Buy a home</Description>
</LoanRecord>
<LoanRecord>
	<mortgageAmount>700000</mortgageAmount>
	<lastName>Green</lastName>
	<firstName>Steve</firstName>
	<SSN>55566688</SSN>
	<PositionTitle>Project Manager</PositionTitle>
	<Address>445 No Where Dr</Address>
	<City>New York</City>
	<StateProv>New York</StateProv>
	<ZipCode>51256</ZipCode>
	<Email>SGreeb@NoMailServer.com</Email>
	<PhoneNum>555-2211</PhoneNum>
	<FaxNum>555-2221</FaxNum>
	<Description>Buy a home</Description>
</LoanRecord>
</batch>
Note: Notice that the XML element that starts and ends each data record is named LoanRecord. This XML element is referenced by the application logic that generates multiple files.
View summary of steps

 

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/outpuMultipleFiles.47.1.html