First off, I am working in Coldfusion, I believe version MX 7. Here is what I am trying to accomplish:
I know how to insert an image, set the position and scale the image. What I would like to do, though is center the image within the imaginary rectangle that is created by the absolute position and the scaled dimensions. For example, in this situation: jpg2.setAbsolutePosition(36, 425); jpg2.scaleToFit(400, 300); If I insert an image that is 200px wide x 300px tall, I would want jpg2.setAbsolutePosition(36, 425); to be adjusted to jpg2.setAbsolutePosition (136, 425); so the image would be centered within the 400px total width. I've tried to use the following: jpg2.setAbsolutePosition(36 + (400 - jpg2.getScaledWidth() / 2), 425 + (300 - jpg2.getScaledWidth() / 2)); but I am encountering an error - "getScaledWidth method not found". Isn't this method found in the "com.lowagie.text.Image" java class? My site is hosted on a shared CF server, so I have no control over installing files, etc. Is this is a case of needing to contact my host to find a solution, or is there another way to accomplish what I'm trying to do? Thank you in advance. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php