First of all, thanks for the quick response.

As for limitations, I don't have any for the image size. I should add the image with "new Chunk(img, 0, 0, true);" as you said so it keeps its original size.

What I need is to resize the cell so the content is fully inside of it and it doesn't overlaps other objects outside the cell or be partially out of the document if the cell is near one of the borders of the page.

To make it short, I want to resize the cell (mostly height, image width can be limited we already take that into account) according to its content as it happens when I add a Paragraph with text only, being the content a Paragraph with text and/or images added by using Chunks.

Hope it's clear enough. Let me know any other information you need.



El 27/12/2010 02:51 p.m., Nurettin DAG escribió:
I may be able to advise on this but I need to know what your limitations are like "Do you know what the size of the image should be or do you want it to fit the line if larger than the width of full line? What are the limitations for height? Do you want to keep its original height or resize to line height?"

To start with if you want to keep image height when placing image in chunk set the flag changeLeading to true and it will do it for you. new Chunk(img, 0, 0, true);

Please explain in detail what you are trying to achieve for each case.

Good luck

2010/12/27 Johann Pérez <[email protected]>
Hello,

I need to be able to add images and text to a PDFPCell resizing it accordingly.


Right now I am using a Paragraph where I add chunks with images or text to it and finally adding the paragraph to the cell but the problem is that the image appears "out of the cell".

This are the results I get:



I add text and images to the cell dinamically according to some metadata so I need the cell to automatically resize so that the image appears completely inside of it.


I am working with iTextSharp.


Thanks in advance.
Johann.

P.D: I apologize for my English as it is not my first language.


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php



--
Nurettin DAG
------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to