flyers wrote:
> Sorry maybe I have overlooked the setAbsolutePosition line..
> What I would like to do is actually to place an image within a rectangle
> area which has an absolute position and certain scale fit. FYI, the rectange
> is not visible and just a virtual area.
> 
> Example:
> Details of the rectangle
> ---------------------------------- 
> jpg.setAbsolutePosition(10, 363);
> jpg.scaleToFit(379, 148);
> 
> 
> Since the rectangle area will start at a position (10,363) and has a width
> of 379, 148 height, I will need to put an image within the 379 width. The
> problem is the image could be of any sizes and I am not able to use apply
> math to fix the centre coordinate. Let say if the image is 190 width x 145
> height, by right it suppose to be shifted at position (95,363) so the image
> would be alligned centre then. How am I possible to do that? 

I think you're trying to achieve what is done in this example:
http://1t3xt.be/?X416
It's no rocket science, just some math...
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to