iText and images

C

Chanchal

Hello,

I'm using iText to generate PDF files. I have PdfPTable objects. Width
of columns on these tables are set. But when I add a cell containing
an image whose width is more than the width of the corresponding
column in Table, it grows beyond the column width. Any idea how to
restrict this?

Thanks

Chanchal
 
R

Roedy Green

But when I add a cell containing
an image whose width is more than the width of the corresponding
column in Table, it grows beyond the column width. Any idea how to
restrict this?

I suppose you have to crop the images before inserting them. You can
do that by drawing with drawImage on a BufferedImage. There may be
even easier ways.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"You can have quality software, or you can have pointer arithmetic; but you cannot have both at the same time."
~ Bertrand Meyer (born: 1950 age: 59) 1989, creator of design by contract and the Eiffel language.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top