Hi, Note that this bug is yet described in Bugzilla: http://issues.apache.org/bugzilla/show_bug.cgi?id=24658
But this is working fine in FOP 0.94, making this bug obsolete. So, you can: - either use Ramkumar solution, - upgrade to latest FOP (0.94), since many bugs are fixed in this version -- the better option ;). Pascal > -----Message d'origine----- > De : ramkumar.m.v [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 26 octobre 2007 03:28 > > Try setting the fop configuration.Your base dir isn't > set.So the fop doesn't know where to get the images > from. > > (programmatic way): > org.apache.fop.configuration.Configuration.put("baseDir",getSe > rvletContext().getRealPath("/images/")); > > The above code should be based in your java code > (typically a servlet),just befor calling your main > code that does the fop work. > > The same can be set up in properties file too.Do a > google on > org.apache.fop.configuration.Configuration.put or > similar and you'll get tons of info. > > The XSL would've something like: > > <fo:external-graphic src="checked.jpg"/> > > or > > <fo:block><fo:external-graphic width="9pt" > height="12pt"> > > <xsl:attribute name="src" ><xsl:value-of > select="imagename"/></xsl:attribute> > > where "imagename" is the xml element (assuming you are > passing the data to xsl in the xml format) that > contains the value "checked.jpg" > > Alternate option: > > <fo:external-graphic > src="http://myserver/myapp/RenderImageServlet?fileName=File128 > 48910.jpg" > width="9pt" height="12pt"></fo:external-graphic> > > Dynamically stream images via a servlet and place that > content into fo:external-graphic as indicated above. > > More info at: > http://java.webdeveloper.com/tutorials/FOP/article.html > > Pick and choose any option that works for you > > Ram > > --- macsmaker <[EMAIL PROTECTED]> wrote: > > > > Bear with me, I'm a newbie to FOP. I assure you I > > have search the web, and > > all faqs I can find. > > > > I'm using fop 0.20.5 and I'm trying to display a > > graphic in my PDF. I have > > tried this (and appropriate variations): > > > > <fo:external-graphic > > > src="url('http://myserver/myapp/images/checked.jpg')"/> > > > > I know the graphic is there, and is displayable. I > > don't get any errors. > > The rest of the PDF renders correctly. If I paste > > the url directly in my > > browser the image is rendered correctly. > > > > This does work: > > <fo:external-graphic > > src="url('file:d:///myapp/images/checked.jpg')"/> > > > > I'm sure it's a problem referencing the image, just > > don't know what. I have > > tried different file formats (.gif, .png, etc), no > > difference. Any ideas? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
