Re: Embedding FOP: resolving 'href' and 'url' references
Re: Embedding FOP: resolving 'href' and 'url' references
- Subject: Re: Embedding FOP: resolving 'href' and 'url' references
- From: Q <email@hidden>
- Date: Tue, 14 Sep 2010 22:31:09 +1000
On 14/09/2010, at 9:14 PM, Paul Hoadley wrote: .. background-image="url('invoice-logo.png')"
(The XSLFO is ephemeral, just living in an NSData object until the PDF is generated, so maybe a relative URL like that doesn't even make sense.) In this case, I get this logged:
Sep 14 20:17:07 PBF[56565] DEBUG FOP - File not found: file:invoice-logo.png Sep 14 20:17:07 PBF[56565] DEBUG AbstractImageSessionContext - URI could not be resolved: invoice-logo.png
It's not clear to me where FOP is looking for these resources, nor how to tell it to look in Resources. Does anyone know?
Unless FOP supports some kind of resource resolution delegate there may not be a nice solution to this issue. You can try supplying the full filesystem path of the resource to the transform files and see if that works, or alternatively you could try using full WSR URL's that point back to the application itself. This may work for static content, but if you need to use a dynamic resource like a WOImage in your content you will likely need to find a different solution.
Have a look at the source for ERPDFGeneration in wonder for how this problem is currently handled. If you aren't tied to using FOP you may wish to try using it instead.
-- Seeya...Q
Quinton Dolan - email@hidden Gold Coast, QLD, Australia (GMT+10)
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden