Hi all, I have a requirement where in the image has to be placed within a particular area whose coordinates are known. The image would be of a larger area than the region and hence we need to scale down the image to fit the area. We generally place the image at the center of the region. But at times, we would need to add a offset in X & Y position and also scaling of the image. I use the following to position the image at a particular location and also scale it.
image.setAbsolutePosition(absX,absY);
image.scalePercent(SCALE );
But here, In this case, the image needs to be clipped off the top in case
the image exceeds the image area. So I'm not sure how to restrict a image to
a particular region.
I saw something called addImage in PDFContentByte but I'm not sure what each
of the coordinates refer to there.
addImage
public void *addImage*(Image <../../../../com/lowagie/text/Image.html> image,
float a,
float b,
float c,
float d,
float e,
float f)
Can someone help me with a solution for my problem? Let me know if you have
any questions.
I've explained it with an example in the attached doc.
--
Thanks & Regards,
Magesh
the image area concept.doc
Description: MS-Word document
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
