[xep-support] [SPAM] Image scaling to fit available height

From: Jan Tošovský <j.tosovsky@gmc.net>
Date: Fri Aug 06 2010 - 07:03:45 PDT

Hello Everyone,

in my 'portrait' documents I use quite reliable method of scaling images to fit the available width:

<fo:block>
   <fo:external-graphic
      src="url(Images/test.png)"
      width="100%"
      height="auto"
      content-width="scale-to-fit"
      content-height="100%"/>
</fo:block>

Now I prepare slides-looking output (landscape) with some text followed by an image. In this scenario it would be helpful to use the similar method as above, but to fill the available height. I've tried to switch corresponding attribute values, but if the image is taller, I am getting [error] no space for an element, trying to recover - and this image is missing in the output.

Here is my current code:

<fo:block>
   <fo:external-graphic
      src="url(Images/test.png)"
      width="auto"
      height="100%"
      content-width="100%"
      content-height="scale-to-fit" />
</fo:block>

Is there any method how to achieve this? I don't want to specify available height explicitly for every image as my template is intended for automated processing...

Regards,

Jan

***SPAM***

!DSPAM:28,4c5c1785409585975413091!

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Aug 6 07:26:54 2010

This archive was generated by hypermail 2.1.8 : Fri Aug 06 2010 - 07:27:02 PDT