itext pdf imagae

onanar used Ask the Experts™

How to add image in pdf table using itext, i have added two lnes to pdf table (name and company), now i need to add singanture image next to that. how to do that?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014
In this case you have to make your table with two columns/with one cell in each column/. In the first column to add another table with the two lines you have mentioned above. On the second column you have to add your image.
Image can be added in this way : Image logo = Image.getInstance(path + "img/Logo.jpg");
If you want to stretch it : logo.scaleToFit(90, 45);
Table with two columns could be created in this way : PdfPTable tblLogo = new PdfPTable(new float [] { 0.5f, 0.5f });
Tables could be nested in each other in this way :
And if you need to align cells, you can do this by :

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial