I'd like to open an HTML file as an OpenOffice.org Writer document using the Java API. I'm using the code from ConversionServlet example. If I open a Word file, I can save it as an OpenOffice.org Writer file without problems. However, it appears that an HTML file is opened as an OpenOffice.org Writer/Web document and OpenOffice.org Writer/Web does not support an sxw export filter.

Is it possible to request that an HTML file be opened as an OpenOffice.org Writer document? How? I can achieve the effect I want from the user interface by opening the HTML file in OpenOffice.org Writer/Web, selecting all, copying and pasting into an empty OpenOffice.org Writer document. If an HTML document cannot be directly opened as an OpenOffice.org Writer document, how do I replicate the effect of copying and pasting via the Java API?

The the entire process I try to carry out is opening an HTML file as an OpenOffice.org Writer document, replacing the style definitions with the style definitions of another OpenOffice.org Writer document and then exporting the resulting document as .sxw and .doc (perhaps all so as .pdf and .rtf). Can I do the style definition replacement easily through the API or should I copy styles.xml on the file format level?

--
Henri Sivonen
[EMAIL PROTECTED]
http://hsivonen.iki.fi/


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to