Jorge Albalate Lopez wrote:
The image is a field from a form, and I only want to add it to the pdf document,preserving the original size of the image. If I calculate the size of the image in points with the methods width() and height() and i use them as parameters of the method scaleAbsolute as shown below, then the resulting image is much greater that the real image.
I think you haven't read my original response close enough. I didn't say you had to use the image in points, I told you you had to calculate the desired dimensions from cm to points; not to use the dimensions in points as you do now. For instance: if you want the image to have a size of 8 x 12 cm (because the image is 945 x 1417px with 300px/inch), you need to scale the image like this: imagenMarca.scaleAbsolute(8f / 2.54f * 72f, 12f / 2.54f * 72f); because1 inch = 72pt and 1cm = 1 / 2.54 inch br, Bruno ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions