com.adobe.livecycle.pdfutility.client
Class PDFUtilityServiceClient

java.lang.Object
  extended by com.adobe.livecycle.pdfutility.client.PDFUtilityServiceClient

public class PDFUtilityServiceClient
extends java.lang.Object

Enables the creation of a Java object that invokes operations that belong to the PDF Utility service. Using this object, you can perform tasks such as converting a PDF document to an XDP file. Another task that you can perform is to query information about a PDF document. For example, you can determine whether a PDF document contains comments or attachments. For information, see Working With PDF Utility Service.


Constructor Summary
PDFUtilityServiceClient(ServiceClientFactory serviceClientFactory)
          Used to create an PDFUtilityService client.
 
Method Summary
 Document clone(Document pdf)
          Clones a PDF document.
 Document convertPDFtoXDP(Document pdf)
          Converts a PDF document into an XDP file.
 Document convertXDPtoPDF(Document xdp)
          Converts an XDP file into a PDF file.
 PDFPropertiesResult getPDFProperties(Document pdf, PDFPropertiesOptionSpec options)
          Performs queries on the specified PDF document and returns the results as a PDFPropertiesResult object.
 PDFUtilitySaveMode getSaveMode(Document pdf)
          Returns the save mode of a PDF document.
 java.lang.String getVersion()
          Returns the PDF Utility service version.
 java.util.List multiclone(Document pdf, int copies)
          Clones a PDF document a specified number of times.
 RedactionResult redact(Document inDoc, RedactionOptionSpec redactionOptionSpec)
           
 Document setSaveMode(Document pdf, PDFUtilitySaveMode saveMode, boolean override)
          Sets the save mode of a PDF document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFUtilityServiceClient

public PDFUtilityServiceClient(ServiceClientFactory serviceClientFactory)
Used to create an PDFUtilityService client.

Parameters:
serviceClientFactory - The service client factory needed to create an instance of the PDFUtilityService client.
Method Detail

getVersion

public java.lang.String getVersion()
Returns the PDF Utility service version.

Returns:
A string value that specifies the version of the PDF Utility service, including the build number.

getPDFProperties

public PDFPropertiesResult getPDFProperties(Document pdf,
                                            PDFPropertiesOptionSpec options)
                                     throws PDFUtilityException
Performs queries on the specified PDF document and returns the results as a PDFPropertiesResult object.

Parameters:
pdf - A Document object that represents the PDF document on which to perform the query.
options - A PDFPropertiesOptionSpec object that specifies which queries are performed.
Returns:
A PDFPropertiesResult object that contains the result of the query.
Throws:
PDFUtilityException - if an error occurs during this operation.

convertXDPtoPDF

public Document convertXDPtoPDF(Document xdp)
                         throws PDFUtilityException
Converts an XDP file into a PDF file. To successfully convert an XDP file into a PDF file, the XDP file must contain an encoded PDF packet.

Parameters:
xdp - A Document object that represents the XDP file to convert to a PDF file.
Returns:
A Document object that represents the PDF document that was converted.
Throws:
PDFUtilityException - If an error occured during this operation. For example, if you specified an XDP file that does not contain an embedded PDF data stream.

convertPDFtoXDP

public Document convertPDFtoXDP(Document pdf)
                         throws PDFUtilityException
Converts a PDF document into an XDP file. In order for a PDF document to be successfully converted to an XDP file, the PDF document must contain an XFA stream in the AcroForm dictionary.

Parameters:
pdf - A Document object that represents the PDF document to convert to an XDP file.
Returns:
A Document object that represents an XDP file.
Throws:
PDFUtilityException - If an error occured during this operation. For example, if you specified an XDP file that does not contain an XFA stream.

clone

public Document clone(Document pdf)
               throws PDFUtilityException
Clones a PDF document. The resulting PDF document can be used independently of the input PDF document. If a given PDF document is passed to multiple services without cloning, the result may be undesired.

For example, assume that a PDF document is passed to two services sequentially. When the first service modifies and returns the PDF document as a Document object, the next service to use the Document object sees modifications made by the first service.

After invoking the clone method, you are assured that the input Document object and the result Document object are the same, and that any future modification of either object will not be reflected in the other object.

Parameters:
pdf - A Document object that represents the PDF document to clone.
Returns:
A Document object that represents the cloned PDF document.
Throws:
PDFUtilityException - If the document could not be cloned.

multiclone

public java.util.List multiclone(Document pdf,
                                 int copies)
                          throws PDFUtilityException
Clones a PDF document a specified number of times. The resulting PDF documents are used independently of the input PDF document. If a PDF document is passed to multiple services without cloning, the result may be undesired.

For example, assume that a PDF document is passed to two services sequentially. When the first service modifies and returns the PDF document as a Document object, the next service to use the Document object sees modifications made by the first service.

After invoking the multiclone method, you are assured that the input Document object and the result Document object contains the same content, and that any future modification of either object will not be reflected in the other object.

Parameters:
pdf - A Document object that represents the PDF document to clone.
copies - The number of copies to return.
Returns:
A List of Document objects that stores one or more cloned PDF documents.
Throws:
PDFUtilityException - If an error occurred while cloning the PDF document.

getSaveMode

public PDFUtilitySaveMode getSaveMode(Document pdf)
Returns the save mode of a PDF document.

The save mode represents the mode in which the PDF document is saved. The following are PDF save mode values:

In addition, the save mode specifies whether the request is considered a requirement or only a suggestion. Save modes values are not influenced by the PDF document content.

Parameters:
pdf - A Document object that represents the PDF document for which save mode information is returned.
Returns:
A PDFUtilitySaveMode object that represents the save mode of the PDF document.
See Also:
PDFUtilityServiceClient.setSaveMode(Document, PDFUtilitySaveMode, boolean)

setSaveMode

public Document setSaveMode(Document pdf,
                            PDFUtilitySaveMode saveMode,
                            boolean override)
Sets the save mode of a PDF document.

The following are PDF save mode values:

Parameters:
pdf - A Document object that represents the PDF document for which save mode information is set.
saveMode - A PDFUtilitySaveMode object that specifies the save mode of the PDF document.
override - A Boolean value that specifies whether to make the setting regardless of any previous requests.
Returns:
A Document object that represents the PDF document for which the save mode information has been set.
See Also:
PDFUtilityServiceClient.getSaveMode(Document)

redact

public RedactionResult redact(Document inDoc,
                              RedactionOptionSpec redactionOptionSpec)
                       throws PDFUtilityException
Parameters:
inDoc - A com.adobe.idp.Document object.
redactionOptionSpec - A com.adobe.livecycle.pdfutility.client.RedactionOptionSpec object specifying the redaction options.
Returns:
A come.adobe.livecycle.pdfutility.client.RedactionResult object containing the resultant PDF Document.
Throws:
PDFUtilityException


[an error occurred while processing this directive] [an error occurred while processing this directive]