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 Michael Wechner <mi...@wyona.com> on 2007/08/27 16:32:21 UTC
Resolving images
Hi
I have seen one can use either
<fo:external-graphic
src="url('http://www.wyona.com/images/wyona_gross.gif
<http://www.wyona.com/images/wyona_gross.gif>')"/>
or
<fo:external-graphic src="url('file:/home/wyona/images/wyona_gross.gif
<http://www.wyona.com/images/wyona_gross.gif>')"/>
to resolve images, but what if my images are located in some other
"repository"?
Can one specify a custom resolver (delivering some InputStream) for FOP?
(Btw, I am using FOP 0.93)
Thanks
Michael
--
Michael Wechner
Wyona - Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner@wyona.com, michi@apache.org
+41 44 272 91 61
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Resolving images
Posted by Michael Wechner <mi...@wyona.com>.
Abel Braaksma wrote:
> Michael Wechner wrote:
>
>>
>> I have seen one can use either
>> <fo:external-graphic
>> src="url('http://www.wyona.com/images/wyona_gross.gif
>> <http://www.wyona.com/images/wyona_gross.gif>')"/>
>
>
> Not really. The above is not valid XML and XSL-FO must first be
> well-formed XML to be parsable. Instead use the following line:
>
> <fo:external-graphic
> src="url('http://www.wyona.com/images/wyona_gross.gif')"/>
my bad, I have copy/pasted one too many
>
>
>> to resolve images, but what if my images are located in some other
>> "repository"?
>> Can one specify a custom resolver (delivering some InputStream) for FOP?
>> (Btw, I am using FOP 0.93)
>
>
> There's a new version just released: FOP 0.94 that fixes a zillion
> bugs and adds (quite) some features. Afaik, you should be able to use
> a URIResolver to resolve your own specific URI Schemes. of course, the
> URIs must still be real URIs.
>
> As an alternative you can think of using a Catalog.
can you send me any pointers how this would work with a Catalog?
Thanks
Michael
>
> Cheers,
> -- Abel Braaksma
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
--
Michael Wechner
Wyona - Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner@wyona.com, michi@apache.org
+41 44 272 91 61
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Resolving images
Posted by Abel Braaksma <ab...@xs4all.nl>.
Michael Wechner wrote:
>
> I have seen one can use either
> <fo:external-graphic
> src="url('http://www.wyona.com/images/wyona_gross.gif
> <http://www.wyona.com/images/wyona_gross.gif>')"/>
Not really. The above is not valid XML and XSL-FO must first be
well-formed XML to be parsable. Instead use the following line:
<fo:external-graphic
src="url('http://www.wyona.com/images/wyona_gross.gif')"/>
> to resolve images, but what if my images are located in some other
> "repository"?
> Can one specify a custom resolver (delivering some InputStream) for FOP?
> (Btw, I am using FOP 0.93)
There's a new version just released: FOP 0.94 that fixes a zillion bugs
and adds (quite) some features. Afaik, you should be able to use a
URIResolver to resolve your own specific URI Schemes. of course, the
URIs must still be real URIs.
As an alternative you can think of using a Catalog.
Cheers,
-- Abel Braaksma
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Resolving images
Posted by Michael Wechner <mi...@wyona.com>.
Peter wrote:
>>Can one specify a custom resolver (delivering some InputStream) for FOP?
>>
>>
>
>Yes, one can do that. E.g. using
>
> FOUserAgent#setURIResolver(URIResolver resolver)
>
>
thanks very much for the pointer. Will try that.
Cheers
Michael
>Peter
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
--
Michael Wechner
Wyona - Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner@wyona.com, michi@apache.org
+41 44 272 91 61
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Resolving images
Posted by Peter <pc...@gmail.com>.
> Can one specify a custom resolver (delivering some InputStream) for FOP?
Yes, one can do that. E.g. using
FOUserAgent#setURIResolver(URIResolver resolver)
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org