xsl-list
[Top] [All Lists]

Re: XSL-FO transformation: XSL template packed in a JAR

2005-07-19 13:05:29
Aitor San Juan wrote:
I have developped a Java class to transform an XML file into a PDF
file using FOP.

...so this question should probably have been sent to
the FOP user list (fop-users(_at_)xmlgraphics(_dot_)apache(_dot_)org)
Anyway:

My Java class, the XSL template and a .gif file (the
image that will appear as the logotype in the header of each page of
the resulting PDF file) are packed in a JAR file.
[snip]
My question: How can I say the FOP processor (or my class, or
whoever) that the .gif file is packed in the JAR?

If you know the absolute path for the jar file, set a jar
URL as baseDir. See
 http://xml.apache.org/fop/configuration.html#summary-key-value
 http://xml.apache.org/fop/embedding.html#config-external
If you don't know the absolute path to the jar file, you can
try to use the servlet context's getRealPath("/") or something
like that (which is not guaranteed to work as expected).

The FOP user list's archive has some more information regarding
this topic, in particular how to deal with jar URLs.

J.Pietschmann

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>