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 "J.Pietschmann" <j3...@yahoo.de> on 2002/10/15 21:11:53 UTC

Re: Problem when specifying an URL for an external image

Calero, Roberto wrote:
> We do XSLT processing for create xml:fo file and then convert them to PDF 
> format. When specifying an URL for including an image we use to have something 
> like this:
> 
> <fo:external-graphic src="http://localhost/xxx/yyyy/zzzz/file.gif"/>
> 
> where localhost is the machine where the conversion from xml:fo-->PDF takes 
> place and where a local webserver runs for serving the images required for the 
> conversion, and it was working fine for 6 months in our production environment. 
> But now suddenly, FOP complains about not being able to locate the image and the 
> resulting PDF docs are not including the images it should.
> 
> We have checked if the images source files are properly placed and they are, but 
> still the problem is there. We use FOP as an stand-alone application.
> 
> So far we have found that if we use file:///D:\aaa\bbb\ccc\file.gif instead of 
> http://xxx/yyy/zzzz/file.gif it works.
> 
> We tried to set the base dir in the userconfig.xml file pointing to 
> http://xxx/yyy/zzzz and FOP seems to be able to contact the local web server but 
> keeps getting a 401 http error.

Yeah, 401 is "forbidden" (you did look up the code, did you?). This means
the server does not allow you (FOP) to access the content.
Try to access the URL with a browser on the machine where FOP runs. Check
the server configuration whether it allows "localhost" or one of its IP
numbers or hostname aliases to access the URL. It may be possible that
the server denies access because it can't revers lookup the hostname from
the IP address because of a DNS outage or misconfiguration. In either case,
if you get stuck, ask a network guru or the customer support for your
webserver.

J.Pietschmann