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 Jocelyn Paine <po...@pop3.ifs.org.uk> on 2001/09/12 13:24:22 UTC

Can fo:external-graphic refer to image URLs? (fwd)

I notice that in all the examples I've seen, the src attribute of
fo:external-graphic points at a file. Can it refer to a URL? I wish to
generate PDF pages which contain lots of graphs. These graphs are
dynamically generated by a servlet which takes a URL containing the
data points in its query parameters, plots the graph on the spot, and
streams it back. So one of our URLs might look like
  http://oursite/plotter/?points=1,2;3,4;5,6&caption=Growth&size=small

I've just tried this with FOP 0.20.1 and get back an error message:
Reference to entity "points" must end with the ';' delimiter. This
strongly suggests that it doesn't know how to parse URLs. (The URL is a
bit longer than the example above, and contains some escaped characters,
but it is valid and understood by both Netscape and IE.)

Of course, to be able to convert such dynamic URLs, FOP would need to make
an HTTP connection with the server and download the image, but that ought
to be possible. So if FOP can't handle images at the end of URLs, my
easiest bet might be to amend the source so it can - Java makes that easy
enough. Where in the source would I look?

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 




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


RE: Can fo:external-graphic refer to image URLs? (fwd)

Posted by Jocelyn Paine <po...@pop3.ifs.org.uk>.
On Wed, 12 Sep 2001, Alistair Hopkins wrote:

Thanks! That works. So FOP can handle fo:external-graphic images at
the end of an HTTP URL.

> Try replacing & with &amp;
> & is a reserved character and the XML parser is interpreting as the start of
> an entity before it even reaches fop.
> 
> -----Original Message-----
> From: Jocelyn Paine [mailto:popx@ifs.org.uk]On Behalf Of Jocelyn Paine
> Sent: Wednesday, September 12, 2001 12:24 PM
> To: fop-dev@xml.apache.org
> Subject: Can fo:external-graphic refer to image URLs? (fwd)
> 
> 
> I notice that in all the examples I've seen, the src attribute of
> fo:external-graphic points at a file. Can it refer to a URL? I wish to
> generate PDF pages which contain lots of graphs. These graphs are
> dynamically generated by a servlet which takes a URL containing the
> data points in its query parameters, plots the graph on the spot, and
> streams it back. So one of our URLs might look like
>   http://oursite/plotter/?points=1,2;3,4;5,6&caption=Growth&size=small
> 
> I've just tried this with FOP 0.20.1 and get back an error message:
> Reference to entity "points" must end with the ';' delimiter. This
> strongly suggests that it doesn't know how to parse URLs. (The URL is a
> bit longer than the example above, and contains some escaped characters,
> but it is valid and understood by both Netscape and IE.)
> 
> Of course, to be able to convert such dynamic URLs, FOP would need to make
> an HTTP connection with the server and download the image, but that ought
> to be possible. So if FOP can't handle images at the end of URLs, my
> easiest bet might be to amend the source so it can - Java makes that easy
> enough. Where in the source would I look?
> 
> Jocelyn Paine
> http://www.ifs.org.uk/~popx/
> +44 (0)7768 534 091
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 


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


RE: Can fo:external-graphic refer to image URLs? (fwd)

Posted by Alistair Hopkins <al...@berthengron.co.uk>.
Try replacing & with &amp;
& is a reserved character and the XML parser is interpreting as the start of
an entity before it even reaches fop.

-----Original Message-----
From: Jocelyn Paine [mailto:popx@ifs.org.uk]On Behalf Of Jocelyn Paine
Sent: Wednesday, September 12, 2001 12:24 PM
To: fop-dev@xml.apache.org
Subject: Can fo:external-graphic refer to image URLs? (fwd)


I notice that in all the examples I've seen, the src attribute of
fo:external-graphic points at a file. Can it refer to a URL? I wish to
generate PDF pages which contain lots of graphs. These graphs are
dynamically generated by a servlet which takes a URL containing the
data points in its query parameters, plots the graph on the spot, and
streams it back. So one of our URLs might look like
  http://oursite/plotter/?points=1,2;3,4;5,6&caption=Growth&size=small

I've just tried this with FOP 0.20.1 and get back an error message:
Reference to entity "points" must end with the ';' delimiter. This
strongly suggests that it doesn't know how to parse URLs. (The URL is a
bit longer than the example above, and contains some escaped characters,
but it is valid and understood by both Netscape and IE.)

Of course, to be able to convert such dynamic URLs, FOP would need to make
an HTTP connection with the server and download the image, but that ought
to be possible. So if FOP can't handle images at the end of URLs, my
easiest bet might be to amend the source so it can - Java makes that easy
enough. Where in the source would I look?

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091




---------------------------------------------------------------------
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