Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ODF Toolkit-Casting Problem

I am developing a webservice to create an odt document with odf toolkit. I did use below code to create a new document but i am getting an casting error. What o you think about it? How can i create formatted(colored etc) text? Thanks

My Code Just

    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();
}

Error

org.odftoolkit.odfdom.pkg.OdfAlienElement cannot be cast to org.odftoolkit.odfdom.dom.meta.MetaInitialCreatorElement

like image 702
Güngör Basa Avatar asked Nov 21 '25 09:11

Güngör Basa


1 Answers

I solve the problem. It is interesting but it is not working with Win7 and jdk6. It works with JDK7 and Win7. It also works jdk6 with WinXp.

like image 87
Güngör Basa Avatar answered Nov 23 '25 00:11

Güngör Basa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!