You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Philip S. Constantinou" <ph...@wayfinder.net> on 2002/08/26 21:19:07 UTC

Loading images

Since I started using FOP I've been frustrated by the requirement that images need to be referred to by an absolute or relative path. Has anyone tried modifying FOP to use the classloader to load the images? It seem like that could resolve some of the deployment problems and make it much easier to deploy FOP within a war file.

It may be naive but it seems like using ClassLoader.getResourceAsStream(m_href.toString(()) in the org.apache.fop.image.AbstractFopImage constructor would resolve this. I'd give it a go myself, but I can't seem to get build.bat to run successfully. PDFGraphicsConfiguration doesn't want to compile.

Any thoughts?


RE: Loading images

Posted by Victor Mote <vi...@outfitr.com>.
Philip S. Constantinou wrote:

<-----Start----->
It may be naive but it seems like using
ClassLoader.getResourceAsStream(m_href.toString(()) in the
org.apache.fop.image.AbstractFopImage constructor would resolve this. I'd
give it a go myself, but I can't seem to get build.bat to run successfully.
PDFGraphicsConfiguration doesn't want to compile.
<-----End----->

Your build problem is probably related to using JDK 1.4. Consider building
with 1.3, or see bullet #6 at http://xml.apache.org/fop/relnotes.html for
the patch that needs to be made to compile with JDK 1.4. HTH.

Victor Mote