Xsl:fo image location

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Xsl:fo image location

Shaw, Richard A
Xsl:fo image location

Can somebody tell me the path to use to get images into my PDF documents using xsl:fo

I'm currently accessing them using HTTP which means I have to put my server address into the stylesheet (or pass in as a parameter), I was hoping that as the formatting was being done on the server it could just load the images directly.

I assumed that the path would be set to the location of the stylesheet so if my images were in the same directory I could simply load them using -

<fo:external-graphic src="url('image.gif')"/>

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

P Consider the environment. Please don't print this e-mail unless you really need to.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

Ryan Puddephatt
Richard,
    I haven't used xsl:fo but with most orbeon stuff images can be accessed through a direct path using the oxf: protocol. I don't see why it won't work in here seeing as all the URL Resolvers should go through Orbeons own class

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com



Shaw, Richard A wrote:
Xsl:fo image location

Can somebody tell me the path to use to get images into my PDF documents using xsl:fo

I'm currently accessing them using HTTP which means I have to put my server address into the stylesheet (or pass in as a parameter), I was hoping that as the formatting was being done on the server it could just load the images directly.

I assumed that the path would be set to the location of the stylesheet so if my images were in the same directory I could simply load them using -

<fo:external-graphic src="url('image.gif')"/>

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

P Consider the environment. Please don't print this e-mail unless you really need to.


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

Ricardo Borillo Domenech
Hi,

I don't know if this apply, but in FOP you can define the file location with:

<fo:external-graphic src="file://image.gif" />

Try first a full path to the file:

<fo:external-graphic src="file:///home/test/image.gif" />


On 3/13/07, Ryan Puddephatt <[hidden email]> wrote:

>
>  Richard,
>      I haven't used xsl:fo but with most orbeon stuff images can be accessed
> through a direct path using the oxf: protocol. I don't see why it won't work
> in here seeing as all the URL Resolvers should go through Orbeons own class
>
>
>
>
>  Ryan Puddephatt
>  Software Engineer
>
>  Teleflex Group - IT UK
>  1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>  e> [hidden email]
>  t> +44(0)1506 407 110
>  f> +44(0)1506 407 108
>  w> www.teleflex.com
>
>
>  Shaw, Richard A wrote:
>
>
> Can somebody tell me the path to use to get images into my PDF documents
> using xsl:fo
>
> I'm currently accessing them using HTTP which means I have to put my server
> address into the stylesheet (or pass in as a parameter), I was hoping that
> as the formatting was being done on the server it could just load the images
> directly.
>
> I assumed that the path would be set to the location of the stylesheet so if
> my images were in the same directory I could simply load them using -
>
> <fo:external-graphic src="url('image.gif')"/>
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Richard Shaw
>  Technical Design Authority - Information Solutions Consultancy
>  Intelligent Transport Systems
>
> Atkins Highways and Transportation
>  Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
>
> Tel: +44 (0) 1372 756407
>  Fax: +44 (0) 1372 740055
>  Mob: 07740 817586
>  E-mail: [hidden email]
>
> www.atkinsglobal.com/its
>
>
>
> This email and any attached files are confidential and copyright protected.
> If you are not the addressee, any dissemination of this communication is
> strictly prohibited. Unless otherwise expressly agreed in writing, nothing
> stated in this communication shall be legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley
> Road, Epsom, Surrey KT18 5BW.
>
> P Consider the environment. Please don't print this e-mail unless you really
> need to. ________________________________
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

weissjeffm
I am having the same problem, the image is in the same folder as everything else in my app (apps/myapp/).  I have tried the following:

url('image.gif')
url('myapp/image.gif')
url('/myapp/image.gif')
url('file://image.gif')
url('oxf:/myapp/image.gif')
url('oxf:image.gif')
url('oxf:/image.gif')

I also tried all the same permutations without the url() function call.

I've even tried copying the image to c:\temp and using url('file:///c/temp/image.gif')  and without the URL function call.

Nothing works.

I notice that I get 404 if I type http://localhost:8080/ops/myapp/image.gif into my browser. I tried adding <files path-info="*.gif" /> to my page flow.  No help.

I have run out of ideas.  Any suggestions?

Ricardo Borillo Domenech wrote
Hi,

I don't know if this apply, but in FOP you can define the file location with:

<fo:external-graphic src="file://image.gif" />

Try first a full path to the file:

<fo:external-graphic src="file:///home/test/image.gif" />


On 3/13/07, Ryan Puddephatt <rpuddephatt@teleflex.com> wrote:
>
>  Richard,
>      I haven't used xsl:fo but with most orbeon stuff images can be accessed
> through a direct path using the oxf: protocol. I don't see why it won't work
> in here seeing as all the URL Resolvers should go through Orbeons own class
>
>
>
>
>  Ryan Puddephatt
>  Software Engineer
>
>  Teleflex Group - IT UK
>  1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>  e> rpuddehatt@teleflex.com
>  t> +44(0)1506 407 110
>  f> +44(0)1506 407 108
>  w> www.teleflex.com
>
>
>  Shaw, Richard A wrote:
>
>
> Can somebody tell me the path to use to get images into my PDF documents
> using xsl:fo
>
> I'm currently accessing them using HTTP which means I have to put my server
> address into the stylesheet (or pass in as a parameter), I was hoping that
> as the formatting was being done on the server it could just load the images
> directly.
>
> I assumed that the path would be set to the location of the stylesheet so if
> my images were in the same directory I could simply load them using -
>
> <fo:external-graphic src="url('image.gif')"/>
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Richard Shaw
>  Technical Design Authority - Information Solutions Consultancy
>  Intelligent Transport Systems
>
> Atkins Highways and Transportation
>  Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
>
> Tel: +44 (0) 1372 756407
>  Fax: +44 (0) 1372 740055
>  Mob: 07740 817586
>  E-mail: richard.shaw@atkinsglobal.com
>
> www.atkinsglobal.com/its
>
>
>
> This email and any attached files are confidential and copyright protected.
> If you are not the addressee, any dissemination of this communication is
> strictly prohibited. Unless otherwise expressly agreed in writing, nothing
> stated in this communication shall be legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley
> Road, Epsom, Surrey KT18 5BW.
>
> P Consider the environment. Please don't print this e-mail unless you really
> need to. ________________________________
>
>
> --
> You receive this message as a subscriber of the ops-users@objectweb.org
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
> --
> You receive this message as a subscriber of the ops-users@objectweb.org
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>


--
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

Alessandro Vernet
Administrator
On 5/11/07, weissjeffm <[hidden email]> wrote:
> I notice that I get 404 if I type http://localhost:8080/ops/myapp/image.gif
> into my browser. I tried adding <files path-info="*.gif" /> to my page flow.

And do you have a file WEB-INF/resources/myapp/image.gif in the web application?

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

weissjeffm
I'm not sure what you're asking.  I don't have anything in WEB-INF/resources/myapp.  All the sample apps, and also myapp, are under WEB-INF/resources/apps.  So my image is in WEB-INF/resources/apps/myapp/image.gif.  What I'm trying to figure out is how to reference it.

Are you saying I should create WEB-INF/resources/myapp/image.gif in a different directory from the rest of my app?

Jeff

Alessandro Vernet wrote
On 5/11/07, weissjeffm <weissj.nabble@jweiss.com> wrote:
> I notice that I get 404 if I type http://localhost:8080/ops/myapp/image.gif
> into my browser. I tried adding <files path-info="*.gif" /> to my page flow.

And do you have a file WEB-INF/resources/myapp/image.gif in the web application?

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

Erik Bruchez
Administrator
Jeff,

I think Alex asks this question because you are giving this as an
example of URLs:

   url('oxf:/myapp/image.gif')

Have you tried:

   url('oxf:/apps/myapp/image.gif')

?

-Erik

weissjeffm wrote:

> I'm not sure what you're asking.  I don't have anything in
> WEB-INF/resources/myapp.  All the sample apps, and also myapp, are under
> WEB-INF/resources/apps.  So my image is in
> WEB-INF/resources/apps/myapp/image.gif.  What I'm trying to figure out is
> how to reference it.
>
> Are you saying I should create WEB-INF/resources/myapp/image.gif in a
> different directory from the rest of my app?
>
> Jeff
>
>
> Alessandro Vernet wrote:
>> On 5/11/07, weissjeffm <[hidden email]> wrote:
>>> I notice that I get 404 if I type
>>> http://localhost:8080/ops/myapp/image.gif
>>> into my browser. I tried adding <files path-info="*.gif" /> to my page
>>> flow.
>> And do you have a file WEB-INF/resources/myapp/image.gif in the web
>> application?
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms for the Enterprise
>> http://www.orbeon.com/
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

weissjeffm
I am not sure if I had tried that last week (but I think I did). In any case, I tried it just now and it didn't work.

Am I supposed to get a 404 when I request http://localhost:8080/ops/myapp/image.gif in a browser?  I am wondering if that might shed light on why I can't get the image in my PDF?

Thanks,
Jeff


Erik Bruchez wrote
Jeff,

I think Alex asks this question because you are giving this as an
example of URLs:

   url('oxf:/myapp/image.gif')

Have you tried:

   url('oxf:/apps/myapp/image.gif')

?

-Erik

weissjeffm wrote:
> I'm not sure what you're asking.  I don't have anything in
> WEB-INF/resources/myapp.  All the sample apps, and also myapp, are under
> WEB-INF/resources/apps.  So my image is in
> WEB-INF/resources/apps/myapp/image.gif.  What I'm trying to figure out is
> how to reference it.
>
> Are you saying I should create WEB-INF/resources/myapp/image.gif in a
> different directory from the rest of my app?
>
> Jeff
>
>
> Alessandro Vernet wrote:
>> On 5/11/07, weissjeffm <weissj.nabble@jweiss.com> wrote:
>>> I notice that I get 404 if I type
>>> http://localhost:8080/ops/myapp/image.gif
>>> into my browser. I tried adding <files path-info="*.gif" /> to my page
>>> flow.
>> And do you have a file WEB-INF/resources/myapp/image.gif in the web
>> application?
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms for the Enterprise
>> http://www.orbeon.com/
>>
>>
>>
>> --
>> You receive this message as a subscriber of the ops-users@objectweb.org
>> mailing list.
>> To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
>> For general help: mailto:sympa@objectweb.org?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>


--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

Erik Bruchez
Administrator
weissjeffm wrote:
> I am not sure if I had tried that last week (but I think I did). In any case,
> I tried it just now and it didn't work.

Ok.

> Am I supposed to get a 404 when I request
> http://localhost:8080/ops/myapp/image.gif in a browser?  I am wondering if
> that might shed light on why I can't get the image in my PDF?

You will get a 404 if this file does not exist:

   RESOURCES/myapp/image.gif

Did you try this URL:

   http://localhost:8080/ops/apps/myapp/image.gif

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

weissjeffm
Interesting, when I use http://localhost:8080/ops/apps/myapp/image.gif

I get a blank space in my table cell that matches the size of the image, instead of a very small empty table cell, so I know it's finding the image.  But it's not displaying for some reason.
Any ideas on that, or what I can use as a relative url?

Erik Bruchez wrote
weissjeffm wrote:
> I am not sure if I had tried that last week (but I think I did). In any case,
> I tried it just now and it didn't work.

Ok.

> Am I supposed to get a 404 when I request
> http://localhost:8080/ops/myapp/image.gif in a browser?  I am wondering if
> that might shed light on why I can't get the image in my PDF?

You will get a 404 if this file does not exist:

   RESOURCES/myapp/image.gif

Did you try this URL:

   http://localhost:8080/ops/apps/myapp/image.gif

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xsl:fo image location

Erik Bruchez
Administrator
Jeff,

I am really not sure! Maybe it's a bug in fop? The version that ships
with Orbeon Forms is pretty old already I think.

-Erik

weissjeffm wrote:

> Interesting, when I use http://localhost:8080/ops/apps/myapp/image.gif
>
> I get a blank space in my table cell that matches the size of the image,
> instead of a very small empty table cell, so I know it's finding the image.
> But it's not displaying for some reason.
> Any ideas on that, or what I can use as a relative url?
>
>
> Erik Bruchez wrote:
>> weissjeffm wrote:
>>> I am not sure if I had tried that last week (but I think I did). In any
>>> case,
>>> I tried it just now and it didn't work.
>> Ok.
>>
>>> Am I supposed to get a 404 when I request
>>> http://localhost:8080/ops/myapp/image.gif in a browser?  I am wondering
>>> if
>>> that might shed light on why I can't get the image in my PDF?
>> You will get a 404 if this file does not exist:
>>
>>    RESOURCES/myapp/image.gif
>>
>> Did you try this URL:
>>
>>    http://localhost:8080/ops/apps/myapp/image.gif
>>
>> -Erik
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws