URI Resolver
Posted: Sat Dec 08, 2012 1:58 am
I'm trying to create a docx file from an XHTML. It's creating the document but it's not using any style. When I check the log I see this:
The problem is that everything is done in the server side and I don't have the path to the css file. It is in fact in a directory that is part of the classpath, so is there a way to specify that? Is there any way to overwrite the default URI Resolver so I can control how the resources are loaded?
- Code: Select all
INFO: doc.css is not a URL; may be relative. Testing using parent URL file:/C:/Projects/XXX/XXX/XXX/./
07-Dec-2012 15:58:25 org.docx4j.org.xhtmlrenderer.util.JDKXRLogger log
INFO: TIME: parse stylesheets 2942ms
07-Dec-2012 15:58:25 org.docx4j.org.xhtmlrenderer.util.JDKXRLogger log
INFO: media = print
07-Dec-2012 15:58:25 org.docx4j.org.xhtmlrenderer.util.JDKXRLogger log
INFO: Requesting stylesheet: file:/C:/Projects/XXX/XXX/XXX/doc.css
07-Dec-2012 15:58:25 org.docx4j.org.xhtmlrenderer.util.JDKXRLogger log
WARNING: item at URI file:/C:/Projects/XXX/XXX/XXX/doc.css not found
07-Dec-2012 15:58:25 org.docx4j.org.xhtmlrenderer.util.JDKXRLogger log
WARNING: Couldn't parse stylesheet at URI file:/C:/Projects/XXX/XXX/XXX/doc.css: Stream closed
The problem is that everything is done in the server side and I don't have the path to the css file. It is in fact in a directory that is part of the classpath, so is there a way to specify that? Is there any way to overwrite the default URI Resolver so I can control how the resources are loaded?