|
|
•
• 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 data that will be merged with the PDF document.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the PDF document to encrypt and the mode in which to open the file.
• 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 File URI option by assigning a string value that specifies the location of the PDF file that the Output service generates to the PDFOutputOptionsSpec object’s fileURI 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.Note: You cannot set the version of the PDF document by using the RenderOptionsSpec object’s setPdfVersion method if the input document is an Acrobat form (a form created in Acrobat) or an XFA document that is signed or certified. The output PDF document retains the original PDF version. Likewise, you cannot set the tagged PDF option by invoking the RenderOptionsSpec object’s setTaggedPDF method if the input document is an Acrobat form or a signed or certified XFA document.Note: You cannot set the linearized PDF option by using the RenderOptionsSpec object’s linearizedPDF member if the input PDF document is certified or digitally signed. For information, see Digitally Signing PDF Documents.Create a PDF document 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. (This parameter value is required only for web service invocation).
• A BLOB object that is populated by the generatePDFOutput method. The generatePDFOutput method populates this object with result data. (This parameter value is required only for web service invocation).
• An OutputResult object that contains the results of the operation. (This parameter value is required only for web service invocation).Caution: When generating a PDF document by invoking the generatePDFOutput method, be aware that you cannot merge data with an XFA PDF form that is signed, certified, or contains usage rights. For information about usage rights, see Applying Usage Rights to PDF Documents.
• 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/outputCreatingPDF.44.4.html