Everything I try here works fine. I can't tell what's going wrong. I think you have no other option than to go debugging into the org.apache.fop.image.ImageFactory class (method: loadImage()).
On 24.01.2008 09:44:21 Lewis, Eric wrote: > Hi Jeremias > > Sorry, I should have written... I'm using FOP 0.93. > > And no, I don't see any other error messages. The messages before and after > come from our own classes. > > However, I set the log level to DEBUG, and this is what I see: > > DEBUG PropertyMaker.findProperty: src, fo:external-graphic > DEBUG Base: file:///C:/<path to my XSL>/ Href: CH00003788_iis0001.tif > DEBUG File not found: file:/C:/<path to my XSL>/CH00003788_iis0001.tif > ERROR Image not available: CH00003788_iis0001.tif > > I don't know why it's searching for the image in my XSL directory first, > since the path is pretty much absolute. > > Thanks for the image scaling information, it works great now! > > > Best regards, > Eric > > -----Ursprüngliche Nachricht----- > Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 24. Januar 2008 09:13 > An: [email protected] > Betreff: Re: Image not available? > > Hi Eric > > What FOP version are you currently working with? > > If you're using current FOP Trunk, you may need to put JAI Image I/O > Tools [1] into your classpath to have a TIFF codec. More on the new > image support will appear shortly on [2] (which I forgot to update after > changing). However, the "Image not available" should have been preceeded > by another error message if the TIFF codec is missing. Are you sure > there are no other error messages? > > [1] https://jai-imageio.dev.java.net/ > [2] http://xmlgraphics.apache.org/fop/trunk/graphics.html > > (more inline below...) > > On 24.01.2008 08:50:28 Lewis, Eric wrote: > > Hi > > > > I'm trying to insert a couple of images into a document that's simple > > but is created in a complex way. > > Anyway, this is how I insert the images: > > > > <xsl:template match="doc-page"> > > <xsl:variable name="imageFile"> > > <xsl:value-of select="concat($imgpath, @file)" /> > > </xsl:variable> > > <fo:block> > > <fo:external-graphic content-height="scale-to-fit" > > content-width="16.8cm" src="{$imageFile}" /> > > </fo:block> > > </xsl:template> > > > > I get the following error (in this case 2 images): > > ERROR Image not available: CH00003788_iis0001.tif > > ERROR Image not available: CH00003788_iis0002.tif > > > > However, the images are shown in the PDF. > > > > If I output the path by using > > <fo:block> > > <xsl:value-of select="$imageFile" /> > > </fo:block> > > > > I get the following in the PDF > > file:///C:/temp/CH00003788_iis0001.tif > > ... > > file:///C:/temp/CH00003788_iis0002.tif > > > > The files are there, I can open them using the URL. > > > > So why does FOP insist on not finding the images? I'm puzzled... > > > > Oh, and while I'm at it, can anyone explain why this doesn't work? > > <fo:external-graphic content-height="scale-to-fit" > > content-width="scale-to-fit" src="{$imageFile}" /> > > The image is not scaled, but is bigger than the page. > > That's because you didn't specify the size of the image viewport > (width/height or > inline-progression-dimension/block-progression-dimension). Just > specifying content-width/content-height like this will render the image > at its intrinsic size, i.e. too big. Just try adding width="100%" which > limits the image's size to the available width and the image will > automatically be scaled down. > > > > > > Thanks for any help, > > Eric > > > > > Jeremias Maerki > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
