<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>I handle 
this problem as follows: Before calling XEP, I call a</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>little Perl 
script that uses Image Alchemy to determine the</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>dimensions 
(in pixel) and resolution&nbsp;of each image file. Based </FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>on this, 
</FONT></SPAN><SPAN class=896390415-14102002><FONT face="Courier New" size=2>the 
script calculates the width and height (in cm) of</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>each graphic 
and stores the result in an xml-file.</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>For each 
graphic, my stylesheet reads the graphic width and height </FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>from this 
xml-file </FONT></SPAN><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2>and compares it with the print area width and </FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2>height.&nbsp;If the image </FONT></SPAN><SPAN 
class=896390415-14102002><FONT face="Courier New" size=2>exceeds the&nbsp;print 
area, the stylesheet </FONT></SPAN><SPAN class=896390415-14102002><FONT 
face="Courier New" size=2>computes </FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002></SPAN><FONT face="Courier New"><FONT 
size=2><SPAN class=896390415-14102002>a scale factor for 
</SPAN></FONT></FONT><FONT face="Courier New"><FONT size=2><SPAN 
class=896390415-14102002>width and height and uses the lesser of these 
</SPAN></FONT></FONT></DIV>
<DIV><FONT face="Courier New"><FONT size=2><SPAN 
class=896390415-14102002></SPAN></FONT></FONT><FONT face="Courier New"><FONT 
size=2><SPAN class=896390415-14102002>values for both </SPAN></FONT></FONT><FONT 
face="Courier New"><FONT size=2><SPAN class=896390415-14102002>content-width 
</SPAN></FONT></FONT><FONT face="Courier New"><FONT size=2><SPAN 
class=896390415-14102002>and content-height.</SPAN></FONT></FONT></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" size=2>Hope this 
helps.</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2>Regards</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2>Matthias</FONT></SPAN></DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=896390415-14102002><FONT face="Courier New" 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
size=2>-----Original Message-----<BR><B>From:</B> ronald heller 
[mailto:ronald@salience.nl]<BR><B>Sent:</B> Monday, October 14, 2002 4:20 
PM<BR><B>To:</B> xep-support@renderx.com<BR><B>Subject:</B> [xep-support] 
scale-when-image-is-too-big<BR><BR></FONT></DIV>Hello there,<BR><BR>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.<BR>Great results...except for my 
graphics.<BR><BR>To my surprise I read that Xep currently doesn't support 
content-width="scale-to-fit". For most of my publications this is 
essential.<BR>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 :-)<BR>I'm looking for a 
<I>"scale-when-image-is-too-big"</I> sort of solution.<BR><BR>Has any of you 
have some relevant experience with scaling images in XEP and maybe you can give 
me some pointers here.<BR>I can't be the only one having this problem.... can I 
?<BR><BR>Grtz<BR>Ronald<BR>------------------- By using the Service, you 
expressly agree to these Terms of Service 
http://www.renderx.com/tos.html</BODY></HTML>