XSL:FO: Fitting images to page

C

CO2

And here is my second problem while converting webpages to pdf:
Scaling large images to fit to the page.

I was using the follwing code to scale the images:

<fo:external-graphic src="{@src}" content-width="scale-to-fit" content-
height="100%" width="100%" scaling="uniform">

This does indeed perfectly fit the large images into the pages but it
also leads to small images taking up the whole space to their right.
E.g. I have a small inline graphic which has text on both sides. With
the scaling code template there is only whitespace to the right.
Removing the attribute width="100%" the small images are inline but
the larger one don't get scaled.

Thanks for any hints on solving this problem.

Michael Niemann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top