You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Markus Vaterlaus <mv...@gmail.com> on 2005/02/21 17:54:45 UTC

Re: urgent
If I got you right, then you need something to check if a gif - or any
other image - exists before you are going to use it in your xsl-fo
file. If it exists, fine, use it. If it does not exist, throw an error
and do something else.

A quite simple solution to do such a thing could be (not verified,
though): Define a matcher to grab the gif from the web space. If it
succeeds save the gif within your cocoon application. Call this gif in
your xsl-fo with an absolute path (which you know of course). If it
fails to grab the gif, create an error and use the already saved gif.

HTH

Markus


On Wed, 16 Feb 2005 15:48:29 -0800 (PST), Murray Cassie
<ca...@yahoo.com> wrote:
> Thanks Robert, but this might not completely cover my
> problem as I am looking for a possibility to reference
> files when I'm not able to specify the absolute path
> at all (the application runs in an environment which
> is not completely under our authority).
> 
> I would be really surprised if there should be no
> possibilty to include gifs without specifying the
> absolute path somewhere - this looks like a weired
> concept to me. Is this really the case?
> 
> I have already thought about using a
> <fo:instream-foreign-object> perhaps even converting
> the gif to a svg.
> 
> Perhaps someone has additional comments or ideas...
> 
> Thanks
> Cassie
> 
> --- "Connell, Robert (SAPOL)"
> <ro...@police.sa.gov.au> wrote:
> 
> > I created a fop-config.xml file and referenced it
> > from within my sitemap
> > serializers section which specifies a base directory
> > which is used by fop as
> > a relative path.  I made this change to my project
> > sitemap to allow each
> > project to have it's own relative files, but I guess
> > this change could be
> > made to your root sitemap and made available to all
> > other cocoon projects.
> >
> > Cocoon sitemap.xmap needs:
> >
> > <map:serializer name="fo2pdf"
> > src="org.apache.cocoon.serialization.FOPSerializer"
> > logger="sitemap.serializer.fo2pdf"
> > mime-type="application/pdf">
> >   <user-config>fop-config.xml</user-config>
> > </map:serializer>
> >
> > A fop-config.xml file which consists of, or contains
> > the following:
> >
> > <entry>
> >   <key>baseDir</key>
> >
> >
> <value>http://localhost:8080/cocoon/MY_PROJECT_NAME</value>
> > </entry>
> >
> > There is more documentation at the apache website:
> >
> >
> http://cocoon.apache.org/2.1/userdocs/serializers/pdf-serializer.html#Create
> > +a+custom+configuration+file
> >
> > Robert
> >
> > -----Original Message-----
> > From: Murray Cassie [mailto:cassie_cu@yahoo.com]
> > Sent: Thursday, 17 February 2005 8:33 AM
> > To: cocoon
> > Subject: urgent <fo:external-graphic and relative
> > path
> >
> > Hi all,
> >
> > I want to include a GIF into a PDF and need to give
> > a
> > relative path from my Cocoon context.
> > (the "realpath hack" in the sitemap cannot be used)
> >
> > I thought the way to do it would be something like:
> > <fo:external-graphic width="113px" height="38px"
> > src="url(static/symbol_combi.gif)"/>
> >
> > But this doesn't work.
> >
> > I would be extremely helpful for any suggestions as
> > we're really under pressure.
> >
> > Thanks and regards
> > Cassie
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile
> > phone.
> > http://mobile.yahoo.com/maildemo
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> >
> >
> 
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - Get yours free!
> http://my.yahoo.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org