You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Lauren Commons <lh...@yahoo.com> on 2002/03/20 19:42:17 UTC

scaling graphics

I've searched the mailing list, and read the specs,
but am still having trouble...
I'm producing PDFs with graphics (jpegs).  I want to
be able to use graphics of unknown size, but force
them to fit in a defined area.   
If I ensure that the available area is bigger than the
jpeg, then it is displayed fine, but if the area is
smaller, no luck.  How can I make fop scale the
graphic to fit the available size?  
The rfc suggests that if the jpeg size doesn't equal
the area size then the image will be scaled (but the
example there defines the image size, which I don't
want to do...).

tia.

=====
-------------------------
Mr Lauren Commons
DISCLAIMER: The opinions expressed 
ARE in fact those of my employer.

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

Re: scaling graphics

Posted by Josh Campbell <jo...@zype.co.nz>.
Real stab in the dark here but could you use % to define the width and 
height of the image. It may then expand/contract to fit the area provided.

Lauren Commons wrote:

>I've searched the mailing list, and read the specs,
>but am still having trouble...
>I'm producing PDFs with graphics (jpegs).  I want to
>be able to use graphics of unknown size, but force
>them to fit in a defined area.   
>If I ensure that the available area is bigger than the
>jpeg, then it is displayed fine, but if the area is
>smaller, no luck.  How can I make fop scale the
>graphic to fit the available size?  
>The rfc suggests that if the jpeg size doesn't equal
>the area size then the image will be scaled (but the
>example there defines the image size, which I don't
>want to do...).
>


-- 
Josh Campbell

ZYPE - Graphical Interface Design
Phone: 03 3862094
Mobile: 021 400 472
Web: www.zype.co.nz