eford wrote:I was previously having some success adding images using the docx4j-nightly-20090528 version. However, after upgrading to docx4j 2.2.0 I started encountering problems again with com.sun.xml.bind.marshaller.NamespacePrefixMapper. I grabbed the source from svn (r 869) and Eclipse is reporting errors involving this reference in org.docx4j.jaxb.NamespacePrefixMapper and org.docx4j.jaxb.NamespacePrefixMapperRelationshipPart - both of which extend the indicated class.
eford wrote:the AddImage.java sample seems to correctly embed an image into a docx file again, however, I am getting a new exception due to org.apache.batik.bridge.UserAgent not being in the classpath.
If you are compiling from source (or using docx4j source in Eclipse - although in this case you might be able to ignore the error), you will need both the JAXB reference implementation, and Java 6 implementation.
If you are using a docx4j distribution based on r869, you should need just one of the 2 implementations. I will create a docx4j distribution based on r869, probably tomorrow.
Is this a fatal error? iirc, there may be a warning message related to batik, but it has not caused problems for me in the past. Is it possible you have some version of fop or xml-graphics say, different from the docx4j versions?
Users browsing this forum: Bing [Bot] and 38 guests