Share

Office2fO

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

how to call the converter code directly !?

You are viewing a single message from this topic. View all messages.

  1. 2008-12-22 18:39:55 UTC
    Hi Val,

    Thanks for checking back.
    I just finished resolving all the compile errors.
    Then, I tried to run a simple conversion as follows:

    public class Odt2FOUseCase {

    public static void main(String[] args) throws Exception
    {
    Odt2XslFoConverter converter = Odt2XslFoConverter.getInstance();
    String inPath = "C:\\inforama\\converter-application\\convertTest\\c.odt";
    String outPath = "C:\\inforama\\converter-application\\convertTest\\c.xsl";
    String imagesDir = "C:\\inforama\\converter-application\\convertTest\\";
    converter.convertToXslFo(inPath, outPath, imagesDir);
    }
    }

    but it's spitting out the following errors:

    Exception in thread "main" java.lang.ClassCastException: org.apache.xerces.dom.DOMImplementationSourceImpl cannot be cast to org.w3c.dom.DOMImplementationSource
    at org.w3c.dom.bootstrap.DOMImplementationRegistry.newInstance(DOMImplementationRegistry.java:150)
    at com.medicaltelecom.command.Odt2XslFoConverter.document2InputStream(Odt2XslFoConverter.java:301)
    at com.medicaltelecom.command.Odt2XslFoConverter.odt2xslfo(Odt2XslFoConverter.java:266)
    at com.medicaltelecom.command.Odt2XslFoConverter.convertToXslFo(Odt2XslFoConverter.java:95)
    at com.medicaltelecom.command.Odt2FOUseCase.main(Odt2FOUseCase.java:16)

    Do you have any idea what the problem might be?
    I will continue to look into it in the meanwhile.

    Thanks again.

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.