How to put absolute position of image in PDF document using java iText library

In this example you will learn how to add the image in absolute position in PDF document using iText java library.

Please note we are using the iText version 5 for this example.

You can set the absolute position of an image using the setAbsolutePosition() method. You have set the absolute position of image before adding the image to the PDF document. The method the setAbsolutePosition() takes two parameters X and Y coordinate of the lower left corner of the image.

Below is the code example of absolute positioning of an image in iText.