net.sf.joott.uno
Class DocumentConverter
java.lang.Object
net.sf.joott.uno.DocumentConverter
- public class DocumentConverter
- extends Object
Performs conversion between supported document formtats.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentConverter
public DocumentConverter()
DocumentConverter
public DocumentConverter(UnoConnection connection)
setConnection
public void setConnection(UnoConnection connection)
convert
public void convert(URI input,
URI output,
DocumentFormat outputFormat)
throws IOException
- Converts a document into a different format.
Example: converts a Writer document to PDF
URI sxw = new URI("http://joott.sourceforge.net/test/test.sxw");
URI pdf = new File("/tmp/test.pdf").toURI();
DocumentConverter converter = DocumentConverterFactory.getConverter();
converter.convert(sxw, pdf, DocumentFormat.PDF_WRITER);
- Parameters:
input - the input documentoutput - the output documentoutputFormat - the output format
- Throws:
FileNotFoundException - if the input document is not found
IOException - if the output document is not writable (or the filter name is wrong)