docx4j.NET icon indicating copy to clipboard operation
docx4j.NET copied to clipboard

Conversion error

Open piresio opened this issue 11 years ago • 2 comments

I tried to make the conversion from PDF to DOCX following the example, however and receive the following error message. erro

piresio avatar Apr 06 '14 21:04 piresio

Well this is pretty interesting... Its a problem with the ClassLoader, but are you using Java?

Anyway you can try to force the ClassLoader something like this: Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );

But perhaps the problem is not within the ClassLoader itself. Can you be sure that the default template is in there?

Remember: Java is good. :+1:

David-Ohio avatar Apr 08 '14 15:04 David-Ohio

I tested it in a console application, not a web app.

Please try adding something like:

        // For ASP.NET, make sure docx4j and xalan are in boot class path
        ikvm.runtime.Startup.addBootClassPathAssembly(
            System.Reflection.Assembly.GetAssembly(
                typeof(org.docx4j.jaxb.Context)));
        ikvm.runtime.Startup.addBootClassPathAssembly(
            System.Reflection.Assembly.GetAssembly(
                typeof(org.apache.xalan.processor.TransformerFactoryImpl)));

plutext avatar Apr 10 '14 23:04 plutext