Andreas,
That did not work. The FontBaseURL configuration does
not seem to be working either. Does FOP 0.92 support
URL's that are dynamically created from within a
jar/war file? Here is the code I added based on your
suggestion:
foUserAgent = fopFactory.newFOUserAgent();
foUserAgent.setBaseURL(
AbstractDataRetriever.class.getResource("resource/").getFile());
fop =
fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent,
baos);
Has anyone got 0.92 working with images and font
metrics files embedded in jar/war files? It worked
fine for me with 0.20.5, but I can't seem to get it to
work with 0.92.
Regards,
Dave
--- Andreas L Delmelle <[EMAIL PROTECTED]>
wrote:
> On Jun 3, 2006, at 19:13, David P. Nesbitt wrote:
>
> > Andreas,
> >
> > Thanks for the response. However, I am running in
> > embedded mode, so I don't think the UserAgent
> thing is
> > relevant. Is it?
>
> It sure is. Even if you don't instantiate one
> explicitly, FopFactory
> uses a default FOUserAgent internally.
>
> > Also, since I want to obtain the
> > resources from the war file, I can't have a static
> > setting in the config file. It needs to be
> determined
> > at run time.
>
> That's were the FOUserAgent steps in. Instead of
> relying on the
> default one provided by FopFactory, you'd
> instantiate one yourself,
> and feed that back into the newFop() factory method.
>
> see:
>
http://xmlgraphics.apache.org/fop/0.92/embedding.html#config-
>
> internal
> mainly the last part about 'Customizing the User
> Agent'
>
>
> HTH!
>
> Andreas
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]