Docmosis API 4.5.0

com.docmosis.document
Class DocumentConverter

java.lang.Object
  extended bycom.docmosis.document.DocumentConverter

public class DocumentConverter
extends Object

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 DocumentConversionResult convert(File inputFile, File outputFile)
          Convert the given input file to the given output file.
static DocumentConversionResult convert(File inputFile, File[] outputFiles)
          Convert the given input file to the set of output files.
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

DocumentConverter

public DocumentConverter()
Method Detail

convert

public static DocumentConversionResult convert(File inputFile,
                                               File[] outputFiles)
                                        throws IOException,
                                               ConverterPoolException
Convert the given input file to the set of output files.

Parameters:
inputFile - the file to convert
outputFiles - the set of files to produce. The file names given determine the type of file produced (for example, "abc.pdf" will create a PDF).
Returns:
a DocumentConversionResult with properties of the conversion.
Throws:
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 parameters
See Also:
for details of the conversion process.

convert

public static DocumentConversionResult convert(File inputFile,
                                               File outputFile)
                                        throws IOException,
                                               ConverterPoolException
Convert the given input file to the given output file. The name of the output file will determine the type of file created. For example, "output.pdf" will create a PDF format file.

Parameters:
inputFile - the file to convert
outputFile - the file to create (or overwrite)
Returns:
a DocumentConversionResult with properties of the conversion.
Throws:
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 parameters

main

public static void main(String[] args)
                 throws Exception
A public main entry point to allow conversions to be run from the command line.
 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.
 

Parameters:
args - as described above
Throws:
Exception - if a problem of any form occurs

Docmosis API 4.5.0

Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.