public class Converter
extends java.lang.Object
Converter c = new Converter(OutputFormat.PDF);
c.addInputFile( "c:/my-doc1.rtf" );
c.addInputFile( "c:/test/my-doc2.rtf" );
c.setOutputDir( "c:/pdfs" );
c.run();
Constructor and Description |
---|
Converter(OutputFormat outputFormat)
Creates a new converter.
|
Modifier and Type | Method and Description |
---|---|
void |
addConvertEventListener(ConverterEventListener l) |
void |
addInputFile(java.io.File file)
Adds an input file to be converted.
|
void |
addInputFile(java.io.File file,
java.io.File output)
Adds an input file to be converted.
|
void |
addInputFile(java.lang.String file)
Adds an input file to be converted.
|
void |
addInputFile(java.lang.String file,
java.lang.String output)
Adds an input file to be converted.
|
void |
addInputFiles(java.io.File[] files)
Adds a set of input files to be converted.
|
protected java.io.File |
createOutputFile(java.io.File inputFile) |
protected void |
fireEvent(ConverterEvent evt) |
FontMapper |
getFontMapper()
Gets the font-mapper for RTF to XSL-FO conversion.
|
java.io.File |
getImageDir()
Gets the directory where images are stored.
|
java.io.File |
getOutputDir()
Gets the directory where converted files are stored.
|
OutputFormat |
getOutputFormat()
Gets the output format.
|
Renderer |
getRenderer()
Gets the used renderer.
|
boolean |
isAutoCompatibilityMode() |
boolean |
isRecognizeXmlDirectives() |
void |
removeAllInputFiles()
Removes all input files.
|
void |
removeConvertEventListener(ConverterEventListener l) |
void |
removeInputFile(java.io.File file)
Removes an input file.
|
void |
removeInputFile(java.lang.String file)
Removes an input file.
|
void |
removeInputFiles(java.io.File[] files)
Removes a set of input files.
|
void |
run()
Starts converting all input files.
|
void |
setAutoCompatibilityMode(boolean autoCompatibilityMode) |
void |
setFontMapper(FontMapper fontMapper)
Sets the font-mapper for RTF to XSL-FO conversion.
|
void |
setImageDir(java.io.File imageDir)
Sets the directory where images are stored.
|
void |
setOutputDir(java.io.File outputDir)
Sets the directory where converted files are stored.
|
void |
setOutputFormat(OutputFormat outputFormat)
Sets the output format.
|
void |
setRecognizeXmlDirectives(boolean recognizeXmlDirectives) |
void |
setRenderer(Renderer renderer)
Sets the renderer.
|
public Converter(OutputFormat outputFormat)
outputFormat
- Output format. You may specify a renderer for
some output formats.public void addInputFile(java.io.File file)
file
- Input file (RTF).public void addInputFile(java.io.File file, java.io.File output)
file
- Input file (RTF).public void addInputFile(java.lang.String file)
file
- Input file (RTF).public void addInputFile(java.lang.String file, java.lang.String output)
file
- Input file (RTF).public void addInputFiles(java.io.File[] files)
files
- Input files (RTF).public void removeInputFile(java.io.File file)
file
- Filepublic void removeInputFile(java.lang.String file)
file
- Filepublic void removeInputFiles(java.io.File[] files)
files
- Input files.public void removeAllInputFiles()
public void run()
public java.io.File getImageDir()
public java.io.File getOutputDir()
public void setOutputDir(java.io.File outputDir)
outputDir
- Output directory.public void setImageDir(java.io.File imageDir)
imageDir
- Image directory.public OutputFormat getOutputFormat()
public Renderer getRenderer()
public void setOutputFormat(OutputFormat outputFormat)
outputFormat
- Output format.public void setRenderer(Renderer renderer)
renderer
- Renderer.public FontMapper getFontMapper()
public boolean isRecognizeXmlDirectives()
public boolean isAutoCompatibilityMode()
public void setFontMapper(FontMapper fontMapper)
fontMapper
- Font mapper.public void setRecognizeXmlDirectives(boolean recognizeXmlDirectives)
public void setAutoCompatibilityMode(boolean autoCompatibilityMode)
public void addConvertEventListener(ConverterEventListener l)
public void removeConvertEventListener(ConverterEventListener l)
protected java.io.File createOutputFile(java.io.File inputFile)
protected void fireEvent(ConverterEvent evt)
© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.