Hi,

Just to be a little bit more specific about my previous post, I should clarify what happens when using:
<fo:block background-color="white" text-align="center">
<fo:external-graphic content-height="25px" height="100px" src="url(image.jpg)"/>
</fo:block>

When using this code, my image has the correct size (25 pixel in height) however the viewport height is not 100 pixel (it actually looks like the viewport height = the image's height. I also tried using 'display-align="center"' on the surrounding fo:block but this does not work (it even makes things worse since now the image is not align anymore). What I really want to do is getting a image at its actual size at the center of a bigger empty block.


Any ideas of how to accomplish this?

Thanks,
Patrick



On 13 Nov 2003, at 10:22 AM, Patrick JUSSEAU wrote:

Hi everyone,

I just started using XSL-FO and fop. I am trying to generate a pdf file which contains jpg files. Those images are always inserted in a parent component (I guess something like a viewport). I need to set a height for this viewport (view_height).

I need to be able to display them in the following 2 cases:

case 1: the image's height is greater than view_height. In that case the image has to scale in order to fit in its view_height. I succeeded in doing that. I did something like (where 100px is the height of my viewport):

<fo:block background-color="white" text-align="center">
<fo:external-graphic content-height="100px" height="100px" src="url(image.jpg)"/>
</fo:block>




case 2: if view_height is greater than the image's height, then I want to display the image at its actual size and display it at the center of its viewport. Doing something like this does not work:

<fo:block background-color="white" text-align="center">
<fo:external-graphic content-height="25px" height="100px" src="url(image.jpg)"/>
</fo:block>


--------------------
|       __________     |
|   |         |     |
|   |  image  |     |
|   ___________     |
|___________________|

What I am missing? Thanks for any help.

Patrick


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



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



Reply via email to