ru.novosoft.dc.rtf_to_xml
Class RTF_TO_XML

java.lang.Object
  |
  +--ru.novosoft.dc.rtf_to_xml.RTF_TO_XML

public class RTF_TO_XML
extends java.lang.Object

The class contains a number of static service methods for convertion from RTF to FO.


Method Summary
static org.w3c.dom.Document[] convert(java.io.InputStream in, RTF_TO_XMLContext context, CommonLogger logger, PicturePool pool, org.w3c.dom.DOMImplementation implementation)
          Convert the specified input file to FO using the specified context, logger, and picture pool.
static void convert(java.lang.String fileName, boolean indent)
          Convert the specified RTF file to FO using the default configuration settings.
static void convert(java.lang.String fileName, int logLevel, boolean indent)
          Convert the specified RTF file to FO using the default configuration settings and the specified logging level.
static void convert(java.lang.String fileName, RTF_TO_XMLContext context, boolean indent)
          Convert the specified RTF file to FO using the specified context and logging to the default logger of the context.
static void convert(java.lang.String source, java.lang.String target, RTF_TO_XMLContext context, CommonLogger logger, ConversionHandler handler, boolean indent)
          Convert the specified RTF file to FO using the specified context and logger.
static void convert(java.lang.String source, java.lang.String target, RTF_TO_XMLContext context, CommonLogger logger, ConversionHandler handler, PicturePool pool, boolean indent)
          Convert the specified RTF file to FO using the specified context, logger, and picture pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convert

public static final void convert(java.lang.String fileName,
                                 boolean indent)
Convert the specified RTF file to FO using the default configuration settings. The results are stored together with the RTF file. The pictures are stored in the subdirectory having the ".images" extension. The normal logging level is used.
Parameters:
fileName - a name of the RTF file to be converted
indent - if true, the document(s) will be written in the indent mode

convert

public static final void convert(java.lang.String fileName,
                                 int logLevel,
                                 boolean indent)
Convert the specified RTF file to FO using the default configuration settings and the specified logging level. The results are stored together with the RTF file. The pictures are stored in the subdirectory having the ".images" extension.
Parameters:
fileName - a name of the RTF file to be converted
logLevel - a logging level
indent - if true, the document(s) will be written in the indent mode

convert

public static final void convert(java.lang.String fileName,
                                 RTF_TO_XMLContext context,
                                 boolean indent)
Convert the specified RTF file to FO using the specified context and logging to the default logger of the context. The results are stored together with the RTF file. The pictures are stored in the subdirectory having the ".images" extension.
Parameters:
fileName - a name of the RTF file to be converted
context - a context of RTF_TO_XML
indent - if true, the document(s) will be written in the indent mode

convert

public static final void convert(java.lang.String source,
                                 java.lang.String target,
                                 RTF_TO_XMLContext context,
                                 CommonLogger logger,
                                 ConversionHandler handler,
                                 boolean indent)
Convert the specified RTF file to FO using the specified context and logger. The results are stored in files specified by the target path. The pictures are stored in the subdirectory having the ".images" extension respectively to the location of target path.
Parameters:
source - a name of the RTF file to be converted
target - a template path for resulting files (its extension is changed to appropriate once)
context - a context of RTF_TO_XML
logger - a logger used for logging messaged
handler - a handler of document conversion
indent - if true, the document(s) will be written in the indent mode

convert

public static void convert(java.lang.String source,
                           java.lang.String target,
                           RTF_TO_XMLContext context,
                           CommonLogger logger,
                           ConversionHandler handler,
                           PicturePool pool,
                           boolean indent)
Convert the specified RTF file to FO using the specified context, logger, and picture pool. The results are stored in files specified by the target path. The following options must be defined in the context: "fo-file-extension", "fo-template-extension", and "fo-data-extension". The method also uses the "xml-line-width" option for specifying of the necessary line width for serialization of fo-file or fo-template. The fo-data are always serialized with indents and with unlimitted line width.
Parameters:
source - a name of the RTF file to be converted
target - a template name for resulting files (its extension is changed to appropriate once)
context - a context of RTF_TO_XML
logger - a logger used for logging messaged
handler - a handler of document conversion
pool - a picture pool responsible for saving pictures
indent - if true, the document(s) will be written in the indent mode

convert

public static final org.w3c.dom.Document[] convert(java.io.InputStream in,
                                                   RTF_TO_XMLContext context,
                                                   CommonLogger logger,
                                                   PicturePool pool,
                                                   org.w3c.dom.DOMImplementation implementation)
Convert the specified input file to FO using the specified context, logger, and picture pool. The results are returned as an array of documents. A number of documents depends on the value of option "prepare-template". If it is "true", two documents will be returned in the array: the first document will contain the template and the last document will contain the text data. Otherwise, the only fo-document is returned.
Parameters:
in - an input stream containing an RTF file
context - a context of RTF_TO_XML
logger - a logger used for logging messaged
pool - a picture pool responsible for saving pictures
implementation - an implementation of W3C DOM used for constructing of documents
Returns:
documents constructed


Other Novosoft LLC products:
Handy Backup Handy Password manager