|
|
•
• Using the Microsoft .NET client assembly, create an OutputServiceService object by invoking its default constructor.
•
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that specifies the location of the XML file that contains form data.
• 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 PrintedOutputOptionsSpec object by using its constructor.
• Specify the URI of the network printer by assigning a string value that represents the location of the network printer to the PrintedOutputOptionsSpec object’s printerURI data member.
• Specify the number of copies to print by assigning an integer value that represents the number of copies to the PrintedOutputOptionsSpec object’s copies data members.Note: You cannot set the pagination value by using the PrintedOutputOptionsSpec object’s setPagination method if you are generating a ZPL print stream. Likewise, you cannot set the following options for a ZPL print stream: OutputJog, PageOffset and Staple. For information about these options, see the LiveCycle ES API References.Send the print stream to a network printer by invoking the OutputServiceService object’s generatePrintedOutput method and passing the following values:
• A PrintFormat enum value that specifies whether to create a PCL, PostScript, or ZPL print stream. For example, to create a PostScript print stream, pass PrintFormat.PostScript.
• A string value that specifies the location of the XDC file to use. You can pass null if you do not want to specify an XDC file.
• The PrintedOutputOptionsSpec object that contains print run-time options required to send a print stream to a network printer.
• The BLOB object that contains the XML data source that contains form data.
• 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).
• 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/outputCreatingPrint.46.4.html