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 Johannes Becker <Jo...@gmx.net> on 2006/08/23 13:27:19 UTC

[0.92beta] foUserAgent.setBaseURL - Problem with external-graphics

Hi,

I'm having troubles understanding setting the baseDir in FOP 0.92beta.

In 0.20.5 I set the baseDir like this: 
Configuration.put("baseDir", pathString);

As far as I understood I can do this in 0.92beta with the foUserAgent:
foUserAgent.setBaseURL(pathString);

Now images aren't emmbedded in my pdf as they used to, using this:
<fo:external-graphic src="logo.jpg" width="10mm" height="10mm" />

What am I missing here? 
- baseURL != baseDir ?
- ???

Cheers
Jonny


-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


Re: [0.92beta] foUserAgent.setBaseURL - Problem with external-graphics

Posted by Chris Bowditch <bo...@hotmail.com>.
Johannes Becker wrote:

> Hi,
> 
> thanks for the hint. I forgot the "file:///". 
> It works now with:
> userAgent.setBaseURL("file:///" + pathString);
> 
> But what are the 3 slashes for in "file:///"? Is this necessary? Will this work on Unix-machines?

3 slahes are necessary because a URL typically has a machine name (or IP 
address after the 2 slashes) In your case, you are referring to a local 
resource so the machine name is omitted. It should work on Unix systems too.

<snip/>

Chris




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


Re: [0.92beta] foUserAgent.setBaseURL - Problem with external-graphics

Posted by Johannes Becker <Jo...@gmx.net>.
Hi,

thanks for the hint. I forgot the "file:///". 
It works now with:
userAgent.setBaseURL("file:///" + pathString);

But what are the 3 slashes for in "file:///"? Is this necessary? Will this work on Unix-machines?

Cheers
Jonny



-------- Original-Nachricht --------
Datum: Wed, 23 Aug 2006 15:51:26 +0200
Von: Andreas L Delmelle <a_...@pandora.be>
An: fop-users@xmlgraphics.apache.org
Betreff: Re: [0.92beta] foUserAgent.setBaseURL - Problem with external-graphics

> On Aug 23, 2006, at 13:27, Johannes Becker wrote:
> 
> Hi,
> 
> <snip />
> > As far as I understood I can do this in 0.92beta with the foUserAgent:
> > foUserAgent.setBaseURL(pathString);
> 
> Sounds right. If this is surrounded by code that resembles the  
> description given on the embedding page, that is...
> http://xmlgraphics.apache.org/fop/0.92/embedding.html#user-agent
> 
> > Now images aren't emmbedded in my pdf as they used to, using this:
> > <fo:external-graphic src="logo.jpg" width="10mm" height="10mm" />
> >
> > What am I missing here?
> > - baseURL != baseDir ?
> > - ???
> 
> No idea, but there should be error messages appearing in the log, and  
> those will indicate what the expanded absolute URI of the missing  
> image is. Maybe there's a hint in there somewhere?
> 
> 
> HTH!
> 
> Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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


Re: [0.92beta] foUserAgent.setBaseURL - Problem with external-graphics

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Aug 23, 2006, at 13:27, Johannes Becker wrote:

Hi,

<snip />
> As far as I understood I can do this in 0.92beta with the foUserAgent:
> foUserAgent.setBaseURL(pathString);

Sounds right. If this is surrounded by code that resembles the  
description given on the embedding page, that is...
http://xmlgraphics.apache.org/fop/0.92/embedding.html#user-agent

> Now images aren't emmbedded in my pdf as they used to, using this:
> <fo:external-graphic src="logo.jpg" width="10mm" height="10mm" />
>
> What am I missing here?
> - baseURL != baseDir ?
> - ???

No idea, but there should be error messages appearing in the log, and  
those will indicate what the expanded absolute URI of the missing  
image is. Maybe there's a hint in there somewhere?


HTH!

Andreas


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