RE: [xep-support] scale-when-image-is-too-big

From: ronald heller (
Date: Mon Oct 14 2002 - 23:37:50 PDT

Yes thank you,

I thought of this as well, but It will be quite a hassle to get this right.
Images in tables, images in lists etc. all complicate things quite a bit
I would have to calculate for each image the possible width, and with all those possible contexts it's not allways that easy.
(calculate the print area width as you call it)

However I will give it a try once more, thank you all for your replies.


At 05:26 PM 14-10-02 +0200, you wrote:
I handle this problem as follows: Before calling XEP, I call a
little Perl script that uses Image Alchemy to determine the
dimensions (in pixel) and resolution of each image file. Based
on this, the script calculates the width and height (in cm) of
each graphic and stores the result in an xml-file.
For each graphic, my stylesheet reads the graphic width and height
from this xml-file and compares it with the print area width and
height. If the image exceeds the print area, the stylesheet computes
a scale factor for width and height and uses the lesser of these
values for both content-width and content-height.
Hope this helps.
-----Original Message-----
From: ronald heller []
Sent: Monday, October 14, 2002 4:20 PM
Subject: [xep-support] scale-when-image-is-too-big

Hello there,

I work with XSL FO files everynow and then, and mostly use FOP. Well not everything is supported in fop so I started using XEP.
Great results...except for my graphics.

To my surprise I read that Xep currently doesn't support content-width="scale-to-fit". For most of my publications this is essential.
Actually I do not want to scale if my image is small enough to fit, but I do want to scale when my image is too large, so one could say scale-to-fit is not a real solution either :-)
I'm looking for a "scale-when-image-is-too-big" sort of solution.

Has any of you have some relevant experience with scaling images in XEP and maybe you can give me some pointers here.
I can't be the only one having this problem.... can I ?

------------------- By using the Service, you expressly agree to these Terms of Service

Salience B.V.
"The XML place to be"
Coltbaan 27b
3439 NG Nieuwegein

Ronald Heller
Technisch Consultant

T +31(0)30 60 56 675
F +31(0)30 60 56 324
M +31(0)6 20 41 25 77
------------------- By using the Service, you expressly agree to these Terms of Service

This archive was generated by hypermail 2.1.5 : Wed Dec 18 2002 - 08:41:28 PST