com.adobe.livecycle.pdfutility
Interface PDFUtilityService


public interface PDFUtilityService

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.


Method Summary
 Document clone(Document inPDFDoc)
          Clones a PDF document.
 Document convertPDFtoXDP(Document inDoc)
          Converts a PDF document into an XDP file.
 Document convertXDPtoPDF(Document inDoc)
          Converts an XDP file into a PDF file.
 PDFPropertiesResult getPDFProperties(Document inPDFDoc, PDFPropertiesOptionSpec options)
          Performs queries on the specified PDF document and returns the results as a PDFPropertiesResponse object.
 PDFUtilitySaveMode getSaveMode(Document inPDFDoc)
          Returns the save mode of a PDF document.
 java.lang.String getVersion()
          Returns the PDF Utility service version.
 java.util.List multiclone(Document inPDFDoc, int copies)
          Clones a PDF document a specified number of times.
 RedactionResult redact(Document inDoc, RedactionOptionSpec redactionOptionSpec)
          Redacts an annotated PDF document.
 SanitizationResult sanitize(Document inDoc)
          Sanitizes a pdf document by removing any unintended hidden information.
 Document setSaveMode(Document inPDFDoc, PDFUtilitySaveMode saveMode, boolean override)
          Sets the save mode of a PDF document.
 

Method Detail

getVersion

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

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

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

convertXDPtoPDF

Document convertXDPtoPDF(Document inDoc)
                         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:
inDoc - 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

Document convertPDFtoXDP(Document inDoc)
                         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:
inDoc - 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

Document clone(Document inPDFDoc)
               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:
inPDFDoc - 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

java.util.List multiclone(Document inPDFDoc,
                          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:
inPDFDoc - 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

PDFUtilitySaveMode getSaveMode(Document inPDFDoc)
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:
inPDFDoc - 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:
PDFUtilityService.setSaveMode(Document,PDFUtilitySaveMode,boolean)

setSaveMode

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

The following are PDF save mode values:

Parameters:
inPDFDoc - 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:
PDFUtilityService.getSaveMode(Document)

redact

RedactionResult redact(Document inDoc,
                       RedactionOptionSpec redactionOptionSpec)
                       throws PDFUtilityException
Redacts an annotated PDF document.

Parameters:
inDoc - A com.adobe.idp.Document object that represents the input PDF document to be redacted.
redactionOptionSpec - A RedactionOptionSpec object which represents the default options for the redaction process. These options shall apply by default to all those redaction regions whose redaction options have not been specified explicitly.
Returns:
A RedactionResult object.
Throws:
PDFUtilityException

sanitize

SanitizationResult sanitize(Document inDoc)
                            throws PDFUtilityException
Sanitizes a pdf document by removing any unintended hidden information.

Parameters:
inDoc - A com.adobe.idp.Document object that represents the input PDF document to be sanitized.
Returns:
A com.adobe.livecycle.pdfutility.client.SanitizationResult object.
Throws:
PDFUtilityException


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