|
|
•
• 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 Rule object by using its constructor.
• Define a text pattern by assigning a string value that specifies a text pattern to the Rule object’s pattern data member.
• Define the corresponding form design by assigning a string value that specifies the form design to the Rule object’s form data member.
• Create an array of Objects that stores the rules.
• Assign each Rule object to an element of the Object array. For example, if you create 12 Rule objects, then create the Object array to have 12 elements and assign each element a Rule object.
• 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.
• Set the copies option by assigning an integer value that specifies the number of copies that the Output service generates to the PDFOutputOptionsSpec object’s copies data member.
• Set the rules that you defined by assigning the Object array that stores the rules to the PDFOutputOptionsSpec object’s rules data member.
• Set the number of bytes to scan for the defined text pattern(s) by assigning an integer value that represents the numbers of bytes to scan to the PDFOutputOptionsSpec object’s lookAhead data method.
• 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 pdfVersion member if the input document is an Acrobat form. The output PDF document retains the PDF version of the Acrobat form. Likewise, you cannot set the tagged PDF option by using the RenderOptionsSpec object’s taggedPDF method if the input document is an Acrobat form.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/outputCreateSearchRules.48.4.html