我正在开发一个with服务,用odf工具包创建一个odt文档。我确实使用了下面的代码来创建一个新文档,但我得到了一个强制转换错误。你是怎么想的?如何创建带格式(彩色等)的文本?谢谢
我的代码只是
try
{
TextDocument outputOdt=TextDocument.newTextDocument();
outputOdt.save("C:\\Users\\TheIntersect\\Documents\\NetBeansProjects\\webWord\\web\\Documents\\docx\\quick.odt");
return "Succesfull";
}
catch (Exception e)
{
return e.getMessage();
}错误
不能将org.odftoolkit.odfdom.pkg.OdfAlienElement强制转换为org.odftoolkit.odfdom.dom.meta.MetaInitialCreatorElement
发布于 2011-08-10 22:49:50
我解决了这个问题。这很有趣,但它不能与Win7和jdk6一起工作。它适用于JDK7和Win7。它还可以与WinXp一起使用jdk6。
https://stackoverflow.com/questions/6831421
复制相似问题