Packagecom.adobe.livecycle.pdfutility
Interfacepublic 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.



Public Methods
 MethodDefined By
  
Clones a PDF document.
PDFUtilityService
  
Converts a PDF document into an XDP file.
PDFUtilityService
  
Converts an XDP file into a PDF file.
PDFUtilityService
  
Performs queries on the specified PDF document and returns the results as a PDFPropertiesResponse object.
PDFUtilityService
  
Returns the save mode of a PDF document.
PDFUtilityService
  
String getVersion()
Returns the PDF Utility service version.
PDFUtilityService
  
List multiclone(Document inPDFDoc, int copies)
Clones a PDF document a specified number of times.
PDFUtilityService
  
Document setSaveMode(Document inPDFDoc, PDFUtilitySaveMode saveMode, boolean override)
Sets the save mode of a PDF document.
PDFUtilityService
Method Detail
clone()
public Document clone(Document inPDFDoc)

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 com.adobe.idp.Document object, the next service to use the com.adobe.idp.Document object sees modifications made by the first service.

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

Parameters

inPDFDoc — A com.adobe.idp.Document object that represents the PDF document to clone.

Returns
A com.adobe.idp.Document object that represents the cloned PDF document.

Throws
PDFUtilityException — If the document could not be cloned.
convertPDFtoXDP() 
public Document convertPDFtoXDP(Document inDoc)

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 com.adobe.idp.Document object that represents the PDF document to convert to an XDP file.

Returns
A com.adobe.idp.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.
convertXDPtoPDF() 
public Document convertXDPtoPDF(Document inDoc)

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 com.adobe.idp.Document object that represents the XDP file to convert to a PDF file.

Returns
A com.adobe.idp.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.
getPDFProperties() 
public PDFPropertiesResult getPDFProperties(Document inPDFDoc, PDFPropertiesOptionSpec options)

Performs queries on the specified PDF document and returns the results as a PDFPropertiesResponse object.

Parameters

inPDFDoc — A com.adobe.idp.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.
getSaveMode() 
public 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 com.adobe.idp.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

getVersion() 
public 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.
multiclone() 
public List multiclone(Document inPDFDoc, int copies)

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 com.adobe.idp.Document object, the next service to use the com.adobe.idp.Document object sees modifications made by the first service.

After invoking the multiclone method, you are assured that the input com.adobe.idp.Document object and the result com.adobe.idp.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 com.adobe.idp.Document object that represents the PDF document to clone.
 
copies — The number of copies to return.

Returns
A List of com.adobe.idp.Document objects that stores one or more cloned PDF documents.

Throws
PDFUtilityException — If an error occurred while cloning the PDF document.
setSaveMode() 
public 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 com.adobe.idp.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 com.adobe.idp.Document object that represents the PDF document for which the save mode information has been set.

See also





 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/com/adobe/livecycle/pdfutility/PDFUtilityService.html