|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.docmosis.document.DocumentConverter
public class DocumentConverter
This class provides conversion-only capabilities, exposing the ability to convert documents between formats, but not to merge with data. This provides an optimum path for format conversion and can use the Docmosis load balancing and scaling facilities if configured. Note this class competes with the DocumentProcessor class for resources.
Constructor Summary | |
---|---|
DocumentConverter()
|
Method Summary | |
---|---|
static com.docmosis.document.DocumentConversionResult |
convert(File inputFile,
File outputFile)
Convert the given input file to the given output file. |
static com.docmosis.document.DocumentConversionResult |
convert(File inputFile,
File[] outputFiles)
Convert the given input file to the set of output files. |
static com.docmosis.document.DocumentConversionResult |
convert(File inputFile,
File outputFile,
ConversionInstruction conversionInstruction)
Convert the given input file to the given output file. |
static com.docmosis.document.DocumentConversionResult |
convert(File inputFile,
File outputFile,
ConversionInstruction conversionInstruction,
ExternalResourcePermissions externalResourcePermissions)
Convert the given input file to the given output file. |
static void |
main(String[] args)
A public main entry point to allow conversions to be run from the command line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentConverter()
Method Detail |
---|
public static com.docmosis.document.DocumentConversionResult convert(File inputFile, File[] outputFiles) throws IOException, ConverterPoolException
inputFile
- the file to convertoutputFiles
- the set of files to produce. The file names given
determine the type of file produced (for example, "abc.pdf" will create
a PDF).
IOException
- if an IO error occurs during processing
ConverterPoolException
- if Docmosis is not initialised ready to process documents
IllegalArgumentException
- if there are issues with input parametersfor details of the conversion process.
The system default external resource permissions will be applied. IOException is thrown
if the document contains links that are not allowed.
public static com.docmosis.document.DocumentConversionResult convert(File inputFile, File outputFile) throws IOException, ConverterPoolException
inputFile
- the file to convertoutputFile
- the file to create (or overwrite)
IOException
- if an IO error occurs during processing
ConverterPoolException
- if Docmosis is not initialised ready to process documents
IllegalArgumentException
- if there are issues with input parameterspublic static com.docmosis.document.DocumentConversionResult convert(File inputFile, File outputFile, ConversionInstruction conversionInstruction) throws IOException, ConverterPoolException
inputFile
- the file to convertoutputFile
- the file to create (or overwrite)conversionInstruction
- conversion instruction settings to specify particular properties. May be null.
IOException
- if an IO error occurs during processing
ConverterPoolException
- if Docmosis is not initialised ready to process documents
IllegalArgumentException
- if there are issues with input parameterspublic static com.docmosis.document.DocumentConversionResult convert(File inputFile, File outputFile, ConversionInstruction conversionInstruction, ExternalResourcePermissions externalResourcePermissions) throws IOException, ConverterPoolException
inputFile
- the file to convertoutputFile
- the file to create (or overwrite)conversionInstruction
- conversion instruction settings to specify particular properties. May be null.externalResourcePermissions
- permissions to apply to references to external
resources. null means use system-defined default. IOException is thrown
if document contains links not allowed by the given permissions.
IOException
- if an IO error occurs during processing
ConverterPoolException
- if Docmosis is not initialised ready to process documents
IllegalArgumentException
- if there are issues with input parameterspublic static void main(String[] args) throws Exception
usage: java com.docmosis.document.DocumentConverter[ [ ...]] : the input file : the file to create ... : other files to create Convert the given input file and store it in the given outfile(s). The format of the result file is determined from the outfile name.
args
- as described above
Exception
- if a problem of any form occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |