|
|
•
• Using the Microsoft .NET client assembly, create an OutputServiceService object by invoking its default constructor.
• Create a BLOB object by using its constructor. The BLOB object is used to store form data that contains multiple records.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the XML file that contains multiple records.
• Create a byte array that stores the content of the System.IO.FileStream object. You can determine the size of the byte array by getting the System.IO.FileStream object’s Length property.
• Populate the byte array with stream data by invoking the System.IO.FileStream object’s Read method and passing the byte array, the starting position, and the stream length to read.
•
• Create a PDFOutputOptionsSpec object by using its constructor.
• Set the Many Files option by assigning a Boolean value to the OutputOptionsSpec object’s generateManyFiles data member. For example, assign the value true to this data member to instruct the Output service to create a separate PDF file for each record in the XML data source. (If you assign false to this data member, then the Output service generates a single PDF that contains all records).
• Set the file URI option by assigning a string value that specifies the location of the file(s) that the Output service generates to the OutputOptionsSpec object’s fileURI data member.
• Set the record name option by assigning a string value that specifies the XML element name in the data source that separates the data records to the OutputOptionsSpec object’s recordName data member.
• Set the copies option by assigning an integer value that specifies the number of copies that the Output service generates to the OutputOptionsSpec object’s copies data member.
• Create a RenderOptionsSpec object by using its constructor.
• Cache the form design in order to improve the performance of the Output service by assigning the value true to the RenderOptionsSpec object’s cacheEnabled data member.Create multiple PDF files by invoking the OutputServiceService object’s generatePDFOutput method and passing the following values:
• A TransformationFormat enum value. To generate a PDF document, specify TransformationFormat.PDF.
• A PDFOutputOptionsSpec object that contains PDF run-time options.
• A RenderOptionsSpec object that contains rendering run-time options.
• The BLOB object that contains the XML data source that contains data to merge with the form design.
• A BLOB object that is populated by the generatePDFOutput method. The generatePDFOutput method populates this object with generated metadata that describes the document.
• A BLOB object that is populated by the generatePDFOutput method. The generatePDFOutput method populates this object with result data.
• An OutputResult object that contains the results of the operation.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents an XML file location that contains result data. Ensure that the file extension is XML.
• Create a byte array that stores the data content of the BLOB object that was populated with result data by the OutputServiceService object’s generatePDFOutput method (the eighth parameter). Populate the byte array by getting the value of the BLOB object’s binaryData data member.
• Create a System.IO.BinaryWriter object by invoking its constructor and passing the System.IO.FileStream object.
• Write the contents of the byte array to the XML file by invoking the System.IO.BinaryWriter object’s Write method and passing the byte array.
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.4.html