You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Savino, Matt C" <Ma...@questdiagnostics.com> on 2002/01/02 21:23:01 UTC

RE: image protocal in Fop on unix

This works for me:

<fo:external-graphic
src="file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I
NF/lib/ClinTrialLogoGreenBig.gif" />

If you figure out how to use a relative path, PLEASE let me know.

-Matt

> -----Original Message-----
> From: Maneshi Tuli [mailto:maneshi.tuli@db.com]
> Sent: Wednesday, January 02, 2002 12:26 PM
> To: fop-dev@xml.apache.org
> Subject: image protocal in Fop on unix
> 
> 
> 
> 
> hi ,
> I want to give the image path on unix machine
> i give like this
> <fo:external-graphic src 
> ="file:/home/opt/weblogic610/wlserver6.1/config/mydomain/appli
> cations/DefaultWebApp/images/english/global_navbar/db_header.gif" />
> 
> i tried with this also
> <fo:external-graphic src 
> ="/home/opt/weblogic610/wlserver6.1/config/mydomain/applicatio
> ns/DefaultWebApp/images/english/global_navbar/db_header.gif" />
> 
> but it is not working , it says no protocal  
> "null/home/opt/weblogic610/wlserver6.1/config/mydomain/applica
> tions/DefaultWebApp/images/english/global_navbar/db_header.gif"
> not found.
> 
> plz help what shouild i give
> 
> thanks
> 
> 
> 
> 
> 
> --
> 
> This e-mail may contain confidential and/or privileged 
> information. If you are not the intended recipient (or have 
> received this e-mail in error) please notify the sender 
> immediately and destroy this e-mail. Any unauthorized 
> copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: image protocal in Fop on unix

Posted by Nicola Ken Barozzi <ba...@nicolaken.com>.
----- Original Message -----
From: "Keiron Liddle" <ke...@aftexsw.com>
To: <fo...@xml.apache.org>
Sent: Thursday, January 03, 2002 3:17 PM
Subject: Re: image protocal in Fop on unix


> > This is really interesting 4 me.
> > I would like to set it for the Cocoon FOP Serializer.
> > How do you set the basedir programmatically?
> > I'd be very grateful if you can indicate the relevant
classes/parameters.
>
> Coccon documentation on how to setup coccon:
> http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html
>
> FOP documentation on how to embed FOP:
> http://xml.apache.org/fop/embedding.html
>

Thank you, but in the docs you indicated there is no reference to base-dir
parameters.
Is it possible to specify it in Options?

I've looked in the code and in AbstractFopImage I have:
            this.m_imageReader =
                ImageReaderFactory.Make(this.m_href.toExternalForm(),
                                        this.m_href.openStream());

Then I looked in FopImageFactory and found:
            // maybe relative
            URL context_url = null;
            String base = Configuration.getStringValue("baseDir");
            if(base == null) {
                throw new FopImageException("Error with image URL: "
                                             + e.getMessage()
                                             + " and no base directory is
specified");
            }
            try {
                absoluteURL = new
URL(Configuration.getStringValue("baseDir")
                                      + absoluteURL.getFile());
            } catch (MalformedURLException e_context) {
                // pb context url
                throw new FopImageException("Invalid Image URL - error on
relative URL : "
                                            + e_context.getMessage());
            }

In the code of the Ant task I found:

   org.apache.fop.configuration.Configuration.put("baseDir",
       task.getFofile().getParentFile().toURL().toExternalForm());

Configuration is static :-O
Should I use Configuration?

Ken
--
Nicola Ken Barozzi                 xml-cocoon@nicolaken.com

These are the days of miracle and wonder...
          ...so don't cry baby, don't cry...
                                                  Paul Simon




Re: image protocal in Fop on unix

Posted by Keiron Liddle <ke...@aftexsw.com>.
> This is really interesting 4 me.
> I would like to set it for the Cocoon FOP Serializer.
> How do you set the basedir programmatically?
> I'd be very grateful if you can indicate the relevant classes/parameters.

Coccon documentation on how to setup coccon:
http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html

FOP documentation on how to embed FOP:
http://xml.apache.org/fop/embedding.html


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: image protocal in Fop on unix

Posted by Nicola Ken Barozzi <ba...@nicolaken.com>.
----- Original Message -----
From: "Keiron Liddle" <ke...@aftexsw.com>
To: <fo...@xml.apache.org>
Sent: Thursday, January 03, 2002 9:18 AM
Subject: Re: image protocal in Fop on unix


> On 2002.01.02 21:23 "Savino, Matt C" wrote:
> > This works for me:
> >
> > <fo:external-graphic
> >
src="file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I
> > NF/lib/ClinTrialLogoGreenBig.gif" />
> >
> > If you figure out how to use a relative path, PLEASE let me know.
>
> The example in "docs/examples/fo/images.fo has relative urls for images
> (can't really have absolute urls for cvs and distributions!).
> The images are loaded properly.
>
> Of course if you are embedding fop then you will need to set the basedir
> via the config.

This is really interesting 4 me.
I would like to set it for the Cocoon FOP Serializer.
How do you set the basedir programmatically?
I'd be very grateful if you can indicate the relevant classes/parameters.

Thank you in advance.

Ken
--
Nicola Ken Barozzi                 xml-cocoon@nicolaken.com

These are the days of miracle and wonder...
          ...so don't cry baby, don't cry...
                                                  Paul Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: image protocal in Fop on unix

Posted by Keiron Liddle <ke...@aftexsw.com>.
On 2002.01.02 21:23 "Savino, Matt C" wrote:
> This works for me:
> 
> <fo:external-graphic
> src="file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I
> NF/lib/ClinTrialLogoGreenBig.gif" />
> 
> If you figure out how to use a relative path, PLEASE let me know.

The example in "docs/examples/fo/images.fo has relative urls for images 
(can't really have absolute urls for cvs and distributions!).
The images are loaded properly.

Of course if you are embedding fop then you will need to set the basedir 
via the config.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org