Re: using ContentHandler for com.xmlmind.fo.converter.Converter

Hussein Shafie <[email protected]>
Newsgroups gmane.text.xml.xfc.general
Message-ID <[email protected]>
This is not the recommended way to invoke Converter. In other words, 
this may have worked by pure luck.

Please refer to 
http://www.xmlmind.com/foconverter/_distrib/doc/user/sample1_java.html

See also

http://www.xmlmind.com/foconverter/_distrib/doc/api/com/xmlmind/fo/converter/Converter.html#setXMLReader(org.xml.sax.XMLReader)

in case you have configured your XMLReader in a specific way.



Александр Сталь wrote:
> Hi, I've resolved this problem!
> I've made my class external by com.xmlmind.fo.converter.Converter and made setOutputStream as public. It works! :)


Александр Сталь wrote:
>
> I try to use com.xmlmind.fo.converter.Converter as ContentHandler.
>
>
> For example:
>
>
> File infile = new File("C://test.fo");
>
> FileInputStream fis = new FileInputStream( infile);
>
> Converter converter = new Converter();
>
> converter.setProperty("outputFormat", "rtf");
>
> converter.setProperty("outputEncoding", "Cp1252");
>
> converter.setProperty("imageResolution", "120");
>
> XMLReader xmlReader = XMLReaderFactory.createXMLReader();
>
> xmlReader.setContentHandler( converter);
>
> xmlReader.parse(new InputSource(fis));
>
> fis.close();
>
> But I have got exception:
>
> Exception in thread "main" org.xml.sax.SAXException: no output specified
>
> How can I set outputstream to Converter?
>
> Thanks.


--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.