|
|
To flatten an interactive PDF document to a non-interactive PDF document using the Output web service API, perform the following tasks:
•
• 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 the interactive PDF document.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the interactive PDF document.
• 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.
• Transform the interactive PDF document to a non-interactive PDF document by invoking the OutputClient object’s transformPDF method and passing the following values:
• A BLOB object that contains the interactive PDF document.
• A TransformationFormat enum value. To generate a non-interactive PDF document, specify TransformationFormat.PDF.
• A PDFARevisionNumber enum value that specifies the revision number.
• A Boolean value that specifies whether the PDFARevisionNumber enum value is used. Because this parameter is meant for a PDF/A document, you can specify false.
• A string value that represents the amendment number and year, separated by a colon. Because this is meant for a PDF/A document, you can specify null.
• A PDFAConformance enum value that represents the PDF/A conformance level.
• Boolean value that specifies whether the PDFAConformance enum value is used. Because this parameter is meant for a PDF/A document, you can specify false.
• Create a System.IO.FileStream object by invoking its constructor and passing a string value that represents the file location of the non-interactive PDF document.
• Create a byte array that stores the data content of the BLOB object that was returned by the transformPDF method. 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 a PDF 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/outputTransformingPDF.49.4.html