|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient
public class GeneratePdfServiceClient
Provides methods for creating PDF documents from other file types, for converting PDF documents to other file types, and for optimizing PDF documents. To see how this class is used to generate PDF documents, see Converting Between File Formats and PDF in Programming with Forms.
Constructor Summary | |
---|---|
GeneratePdfServiceClient(ServiceClientFactory factory)
This is the constructor for creating a Generate PDF client instance. |
Method Summary | |
---|---|
CreatePDFResult |
createPDF(Document inDoc,
java.lang.String inputFileName,
java.lang.String fileTypeSettings,
java.lang.String pdfSettings,
java.lang.String securitySettings,
Document inSettingsDoc,
Document inXMPDoc)
Converts different file formats into PDF documents. |
CreatePDFResult |
createPDF2(Document inDoc,
java.lang.String inputFileExtension,
java.lang.String fileTypeSettings,
java.lang.String pdfSettings,
java.lang.String securitySettings,
Document inSettingsDoc,
Document inXMPDoc)
Converts different file formats into PDF documents. |
CreatePDFResult |
createPDF3(java.util.Map inputDocuments,
java.lang.String primaryFileToConvertFilter,
java.lang.String inputFileExtension,
java.lang.String fileTypeSettings,
java.lang.String pdfSettings,
java.lang.String securitySettings,
Document inSettingsDoc,
Document inXMPDoc)
Converts different file formats into PDF documents. |
ExportPDFResult |
exportPDF(Document inputDocument,
java.lang.String inputFileName,
ConvertPDFFormatType formatType,
Document inSettingsDoc)
Converts a PDF document to the specified file type. |
ExportPDFResult |
exportPDF2(Document inputDocument,
java.lang.String inputFileExtension,
ConvertPDFFormatType formatType,
Document inSettingsDoc)
Converts a PDF document to the specified different file type. |
HtmlToPdfResult |
htmlFileToPDF(Document inputDocument,
java.lang.String fileTypeSettingsName,
java.lang.String securitySettingsName,
Document inSettingsDoc,
Document inXMPDoc)
Creates a PDF document from an input HTML file, Txt file or a ZIP file containing HTML files and/or Image files. |
HtmlToPdfResult |
htmlToPDF(java.lang.String inputUrl,
java.lang.String fileTypeSettingsName,
java.lang.String securitySettingsName,
Document inSettingsDoc,
Document inXMPDoc)
Creates a PDF document from an HTML file located at a given URL. |
HtmlToPdfResult |
htmlToPDF2(java.lang.String inputUrl,
java.lang.String fileTypeSettingsName,
java.lang.String securitySettingsName,
Document inSettingsDoc,
Document inXMPDoc)
Creates a PDF document from an HTML file located at a given URL. |
OptimizePDFResult |
optimizePDF(Document inputDocument,
java.lang.String fileTypeSettings,
Document inSettingsDoc)
Optimizes the input PDF document by reducing its size. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeneratePdfServiceClient(ServiceClientFactory factory)
factory
- A ServiceClientFactory instance with valid credentials of the server
where the service is deployed.Method Detail |
---|
public CreatePDFResult createPDF(Document inDoc, java.lang.String inputFileName, java.lang.String fileTypeSettings, java.lang.String pdfSettings, java.lang.String securitySettings, Document inSettingsDoc, Document inXMPDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
Some of the parameters are optional, which means that null values may be provided if they are not needed. Security permissions, PDF Output Settings and metadata information can optionally be applied to the resultant PDF document.
inDoc
- This mandatory parameter contains an instance of the Document
whose content is to be converted. For this object, it is recommended that you either use the
appropriate Document
constructor if you have access to the file, or that you use the
com.adobe.idp.Document.setAttribute()
method
if you only have access to the stream.inputFileName
- This optional parameter contains the file name, with the appropriate extension,
of the document to be converted.fileTypeSettings
- Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.pdfSettings
- Name of the Adobe PDF Settings to apply.
Forms installs the following settings, although the exact names differ depending on locale:
"High Quality Print"
"Oversized Pages"
"PDFA1b 2005 CMYK"
"PDFA1b 2005 RGB"
"PDFX1a 2001"
"PDFX3 2002"
"Press Quality"
"Smallest File Size"
"Standard"
securitySettings
- Name of a security settings instance that is defined on the Forms server.
These settings can be viewed by using the Forms Administration Console window for Generate PDF.
You can also use this same window to create custom settings.
The default security setting is "No Security"
,
although the exact name differs depending on locale.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default security settings defined on the Forms server.inSettingsDoc
- file2pdf-settings XML file that contains file type settings to use for optimization,
including the file type settings PDF settings, and security settings used by this method.
For information about this file, see the description for the createPDF2()
method.inXMPDoc
- This optional parameter contains the file containing metadata information to be applied
to the generated PDF document. Only UTF-8 encoded XMP metadata is supported.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
public HtmlToPdfResult htmlToPDF(java.lang.String inputUrl, java.lang.String fileTypeSettingsName, java.lang.String securitySettingsName, Document inSettingsDoc, Document inXMPDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
inputUrl
- The URL for the HTML file.fileTypeSettingsName
- Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.securitySettingsName
- Name of a security settings instance that is defined on the Forms server.
These settings can be viewed by using the Forms Administration Console window for Generate PDF.
You can also use this same window to create custom settings.
The default security setting is "No Security"
,
although the exact name differs depending on locale.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default security settings defined on the Forms server.inSettingsDoc
- file2pdf-settings XML file that contains file type settings to use for optimization,
including the file type settings and security settings used by this method.
For information about this file, see the description for the createPDF2()
method.inXMPDoc
- This optional parameter contains the file containing metadata information to be applied
to the generated PDF document. Only UTF-8 encoded XMP metadata is supported.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
public HtmlToPdfResult htmlFileToPDF(Document inputDocument, java.lang.String fileTypeSettingsName, java.lang.String securitySettingsName, Document inSettingsDoc, Document inXMPDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
inDoc
- This mandatory parameter contains an instance of the Document
whose content is to be converted. For this object, it is recommended that you either use the
appropriate Document
constructor if you have access to the file, or that you use the
com.adobe.idp.Document.setAttribute()
method
if you only have access to the stream.fileTypeSettingsName
- Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.securitySettingsName
- Name of a security settings instance that is defined on the Forms server.
These settings can be viewed by using the Forms Administration Console window for Generate PDF.
You can also use this same window to create custom settings.
The default security setting is "No Security"
,
although the exact name differs depending on locale.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default security settings defined on the Forms server.inSettingsDoc
- A file2pdf-settings XML file that contains all settings used by the Generate PDF service,
including the file type settings and security settings used by this method.
For information about this file, see the description for the createPDF2()
method.inXMPDoc
- An XML file that specifies metadata information to be applied
to the generated PDF document. Only UTF-8 encoded XMP metadata is supported.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
public ExportPDFResult exportPDF(Document inputDocument, java.lang.String inputFileName, ConvertPDFFormatType formatType, Document inSettingsDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
inputDocument
- The PDF document to be converted.inputFileName
- The name of the input document.formatType
- The target file format to which the PDF document will be converted.inSettingsDoc
- file2pdf-settings XML file that contains file type settings to use for optimization.
For information about this file, see the description for the createPDF2()
method.
formatType
parameter.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
ConvertPDFFormatType
public CreatePDFResult createPDF2(Document inDoc, java.lang.String inputFileExtension, java.lang.String fileTypeSettings, java.lang.String pdfSettings, java.lang.String securitySettings, Document inSettingsDoc, Document inXMPDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
This method obtains conversion parameters from one the following sources (listed in order of consideration):
inSettingsDoc
parameter)fileTypeSettings
, pdfSettings
,
and securitySettings
parameters)The file2pdf-settings XML file specified by the inSettingsDoc
parameter is an XML file
that contains a serialized representation of
the PDF Generator settings that can be configured by using the Forms Administration Console.
This method uses the following settings from the file2pdf-settings XML file, which is a subset of what the file contains:
Install directory\Forms_SDK\schemas\PDFGenerator.
The file2pdf-settings XML file can contain multiple instances of each of these settings.
This method uses only the default settings instances.
These default settings instances are identified by the default
attribute in the corresponding element.
That is, this method uses the filetype-settings
element that contains the following attribute:
file2pdf-settings/filetype-settings/settings/@default="true"
And it uses the security-settings
element that contains the following attribute:
file2pdf-settings/security-settings/settings/@default="true"
inDoc
- This mandatory parameter contains an instance of the Document
whose content is to be converted. For this object, it is recommended that you either use the
appropriate Document
constructor if you have access to the file, or that you use the
com.adobe.idp.Document.setAttribute()
method
if you only have access to the stream.inputFileExtension
- This optional parameter contains the file extension of the document to be converted.fileTypeSettings
- Settings to be applied to the generated PDF document.
Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.pdfSettings
- Name of the Adobe PDF Settings to apply.
Forms installs the following settings, although the exact names differ depending on locale:
"High Quality Print"
"Oversized Pages"
"PDFA1b 2005 CMYK"
"PDFA1b 2005 RGB"
"PDFX1a 2001"
"PDFX3 2002"
"Press Quality"
"Smallest File Size"
"Standard"
securitySettings
- Name of a security settings instance that is defined on the Forms server.
These settings can be viewed by using the Forms Administration Console window for Generate PDF.
You can also use this same window to create custom settings.
The default security setting is "No Security"
,
although the exact name differs depending on locale.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default security settings defined on the Forms server.inSettingsDoc
- A file2pdf-settings XML file that contains PDF Generator settings,
including the file type settings, PDF settings (job options), and security settings used by this method.
For information about this file, see the description for this method.inXMPDoc
- This optional parameter contains the file containing metadata information to be applied
to the generated PDF document. Only UTF-8 encoded XMP metadata is supported.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
public CreatePDFResult createPDF3(java.util.Map inputDocuments, java.lang.String primaryFileToConvertFilter, java.lang.String inputFileExtension, java.lang.String fileTypeSettings, java.lang.String pdfSettings, java.lang.String securitySettings, Document inSettingsDoc, Document inXMPDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
This method obtains conversion parameters from one the following sources (listed in order of consideration):
inSettingsDoc
parameter)fileTypeSettings
, pdfSettings
,
and securitySettings
parameters)The file2pdf-settings XML file specified by the inSettingsDoc
parameter is an XML file
that contains a serialized representation of
the PDF Generator settings that can be configured by using the Forms Administration Console.
This method uses the following settings from the file2pdf-settings XML file, which is a subset of what the file contains:
Install directory\Forms_SDK\schemas\PDFGenerator.
The file2pdf-settings XML file can contain multiple instances of each of these settings.
This method uses only the default settings instances.
These default settings instances are identified by the default
attribute in the corresponding element.
That is, this method uses the filetype-settings
element that contains the following attribute:
file2pdf-settings/filetype-settings/settings/@default="true"
And it uses the security-settings
element that contains the following attribute:
file2pdf-settings/security-settings/settings/@default="true"
inputDocuments
- This mandatory parameter is a java.util.Map containing instances of
Document
representing the document to be converted, along with resources
referred to by this document. For this object, it is recommended that you populate the map either
using the appropriate Document
constructor if you have access to the file,
or using the com.adobe.idp.Document.setAttribute()
method
if you only have access to the stream.primaryFileToConvertFilter
- This mandatory parameter is a java.lang.String representing the
pattern matching the name of the file to be converted.inputFileExtension
- This optional parameter contains the file extension of the document to be converted.fileTypeSettings
- Settings to be applied to the generated PDF document.
Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.pdfSettings
- Name of the Adobe PDF Settings to apply.
Forms installs the following settings, although the exact names differ depending on locale:
"High Quality Print"
"Oversized Pages"
"PDFA1b 2005 CMYK"
"PDFA1b 2005 RGB"
"PDFX1a 2001"
"PDFX3 2002"
"Press Quality"
"Smallest File Size"
"Standard"
securitySettings
- Name of a security settings instance that is defined on the Forms server.
These settings can be viewed by using the Forms Administration Console window for Generate PDF.
You can also use this same window to create custom settings.
The default security setting is "No Security"
,
although the exact name differs depending on locale.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default security settings defined on the Forms server.inSettingsDoc
- A file2pdf-settings XML file that contains PDF Generator settings,
including the file type settings, PDF settings (job options), and security settings used by this method.
For information about this file, see the description for this method.inXMPDoc
- This optional parameter contains the file containing metadata information to be applied
to the generated PDF document. Only UTF-8 encoded XMP metadata is supported.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
public ExportPDFResult exportPDF2(Document inputDocument, java.lang.String inputFileExtension, ConvertPDFFormatType formatType, Document inSettingsDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
inputDocument
- The PDF document to be converted.inputFileExtension
- The extension of the input file.formatType
- The target file format to which the PDF document will be converted.inSettingsDoc
- A file2pdf-settings XML file that contains PDF Generator settings.
For information about this file, see the description for the createPDF2()
method.
formatType
parameter.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
ConvertPDFFormatType
public OptimizePDFResult optimizePDF(Document inputDocument, java.lang.String fileTypeSettings, Document inSettingsDoc) throws ConversionException, InvalidParameterException, FileFormatNotSupportedException
inDoc
- This mandatory parameter contains an instance of the Document
whose content is to be optimized. For this object, it is recommended that you either use the
appropriate Document
constructor if you have access to the file, or that you use the
com.adobe.idp.Document.setAttribute()
method
if you only have access to the stream.fileTypeSettings
- Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.inSettingsDoc
- file2pdf-settings XML file that contains file type settings to use for optimization,
including the file type settings used by this method.
For information about this file, see the description for the createPDF2()
method.
ConversionException
InvalidParameterException
FileFormatNotSupportedException
public HtmlToPdfResult htmlToPDF2(java.lang.String inputUrl, java.lang.String fileTypeSettingsName, java.lang.String securitySettingsName, Document inSettingsDoc, Document inXMPDoc) throws InvalidParameterException, ConversionException, FileFormatNotSupportedException
inputUrl
- The URL for the HTML file.fileTypeSettingsName
- Name of a file type settings instance that is defined on the Forms server.
The Forms Administration Console window for Generate PDF lets you view the currently defined file type settings.
It also lets you create custom file type settings.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default file type settings instance that is defined on the Forms server.securitySettingsName
- Name of a security settings instance that is defined on the Forms server.
These settings can be viewed by using the Forms Administration Console window for Generate PDF.
You can also use this same window to create custom settings.
The default security setting is "No Security"
,
although the exact name differs depending on locale.
If the inSettingsDoc
parameter specifies a non-NULL value, this parameter is ignored.
If this parameter and the inSettingsDoc
parameter are both null,
this method uses the default security settings defined on the Forms server.inSettingsDoc
- file2pdf-settings XML file that contains file type settings to use for optimization,
including the file type settings and security settings used by this method.
For information about this file, see the description for the createPDF2()
method.inXMPDoc
- This optional parameter contains the file containing metadata information to be applied
to the generated PDF document. Only UTF-8 encoded XMP metadata is supported.
InvalidParameterException
ConversionException
FileFormatNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |