David P. Nesbitt wrote:
I am trying to use FOP from with an application
deployed on JBoss with a single ear file.  My goal is
to have all font metrics, font files, and image files
loaded from within the war file embedded in the ear
file.  The fop.jar is in the WEB-INF/lib directory of
the war file.  The font and image files are under the
WEB-INF/classes directory of the war file.

I am doing something wrong, but cannot determine what.
 Any help would be most appreciated it.  The details
are below.
...
      org.apache.fop.configuration.Configuration.put(
            "baseDir",
AbstractDataRetriever.class.getResource("resource/").getFile());

The base dir is meant to be a string, which is used as a prefix. A resource object wont work. You can try to use baseURL (or was it baseURI?) instead, using a jar URI. You'd need the absolute file path to the ear file for this, which might be difficult to get.

 <font metrics-file="arial.xml" kerning="yes"
embed-file="arial.ttf">

A font file *must* be a real file, it is opened using a java.io.File object. There is no way to get it from anywhere else than the file system.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to