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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to