Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

Re: [iText-questions] Scaling with aspect ratio--preserved

Bruno

2007-09-12


meenakshi thilagam wrote:
> Hello Everybody,
>
> I am trying to create a table and put images in each
> cell of the table.
> What ever the size of the image is it should fit the
> cell and the aspect ratio should be preserved.

I see you've tried scaleToFit().
That works for me.

> I have also tried scalepercent but that does not work
> either.

Why do you think that doesn't work?
It works for me.

> The images which correctly work with the above
> statement are 640x480 pixels
> but if the image is 480X640 then it does not get
> enlarged to fit my 400x160 (given in the method).

How can you enlarge a 480x640 to a smaller size?

> I hope I have explained the problem clearly if not
> please let me know I will try again.

I don't understand the question.
Instead of telling us about the things that don't
work for you, you could explain what you expect first.

You have images, you want to add them in a PdfPTable
with only one column. Which size do you want the
images or cells to have?

br,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
©2008 junlu.com - Jax Systems, LLC, U.S.A.