Do you have some example code on using PdfPCellEvent? I can't find any on
the web or in the book.
As far as I know one can't put 2 objects in a cell with PdfPCell.addElement
()
My knowledge of iText is rudimentary.

I could try ColumnText as it seems straightforward.

If I got it right aboslute positions starts from the bottom and up, while
document,add() positions elements from top to bottom.

2007/3/21, Paulo Soares <[EMAIL PROTECTED]>:

You can do your own layout with ColumnText, PdfPTable and images at
absolute positions or you can put the image inside a PdfPTable and get
the cell position in a PdfPCellEvent. There's no need for trial and
error.

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Sverre Moe
> Sent: Wednesday, March 21, 2007 10:39 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Overlay a transparent gif on
> another image
>
> I understand, but this gives me a new problem. My document is
> layed out like this: Some Text - A Image - Some tables
> If I positioned the image with this code:
> image.scaleToFit(PageSize.A4.width(), PageSize.A4.height ());
> image.setAlignment(Image.MIDDLE | Image.TEXTWRAP);
> image.setAbsolutePosition(0, 350);
> document.add(image);
>
> With this code the image is aligned just below the upper
> text, but the tables below are now inside the image. If I
> have to set them at absolute position as well it seems like a
> lot of work. In order to find the absolute position of the
> image I had a lot of trial and error to find the correct
> position(0,350). I gues it will be harder to position all my
> tables below(4 tables).
>
>
> 2007/3/20, Paulo Soares <[EMAIL PROTECTED]>:
>
>       You must place the images at absolute positions
> otherwise how would you know
>       where to place the overlay?
>
>       Paulo
>
>       ----- Original Message -----
>       From: "Sverre Moe" < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> >
>       To: "Post all your questions about iText here"
>       <[email protected]>
>       Sent: Tuesday, March 20, 2007 2:09 PM
>       Subject: Re: [iText-questions] Overlay a transparent
> gif on another image
>
>
>       >I dont understand exactly. I am not drawing a image,
> it already exist and
>       >is
>       > retrieved and displayed with the following code.
>       > Image image = Image.getInstance(new URL(url));
>       > image.scaleToFit(PageSize.A4.width(), PageSize.A4.height());
>       > image.setAlignment(Image.MIDDLE | Image.TEXTWRAP);
>       > document.add(image);
>       >
>       > In addition to this image I have a transparent gif
> which I want to overlay
>       > on this. Or perhaps draw shapes directly onto it.
>       >
>       > 2007/3/20, Paulo Soares <[EMAIL PROTECTED] >:
>       >>
>       >>
>       >> ----- Original Message -----
>       >> From: "Sverre Moe" <[EMAIL PROTECTED]>
>       >> To: < [email protected]
> <mailto:[email protected]> >
>       >> Sent: Tuesday, March 20, 2007 11:15 AM
>       >> Subject: [iText-questions] Overlay a transparent gif
> on another image
>       >>
>       >> > How can this be achieved with iText or if it is
> possible? Maybe I could
>       >> > just
>       >> > read the image in memory and paint on it using
> Graphics2D, but this
>       >> seems
>       >> > like unnecessary extra work.
>       >>
>       >> Don't use Graphics2D. Draw the first image and then
> the GIF on top of it,
>       >> the transparent parts will show, it's that simple.
>       >>
>       >> Paulo
>       >>
>       >>
>       >>
> --------------------------------------------------------------
> -----------
>       >> Take Surveys. Earn Cash. Influence the Future of IT
>       >> Join SourceForge.net's Techsay panel and you'll get
> the chance to share
>       >> your
>       >> opinions on IT & business topics through brief
> surveys-and earn cash
>       >>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> <http://www.techsay.com/default.php?page=join.php&p=sourceforg
> e&CID=DEVDEV>
>       >> _______________________________________________
>       >> iText-questions mailing list
>       >> [email protected]
> <mailto:[email protected]>
>       >> https://lists.sourceforge.net/lists/listinfo/itext-questions
>       >> Buy the iText book: http://itext.ugent.be/itext-in-action/
>       >>
>       >
>
>
>
> --------------------------------------------------------------
> ------------------
>
>
>       >
> --------------------------------------------------------------
> -----------
>       > Take Surveys. Earn Cash. Influence the Future of IT
>       > Join SourceForge.net's Techsay panel and you'll get
> the chance to share
>       > your
>       > opinions on IT & business topics through brief
> surveys-and earn cash
>       >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
>
>
>
> --------------------------------------------------------------
> ------------------
>
>
>       > _______________________________________________
>       > iText-questions mailing list
>       > [email protected]
>       >
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> <https://lists.sourceforge.net/lists/listinfo/itext-questions>
>       > Buy the iText book: http://itext.ugent.be/itext-in-action/
>       >
>
>
>
> --------------------------------------------------------------
> -----------
>       Take Surveys. Earn Cash. Influence the Future of IT
>       Join SourceForge.net's Techsay panel and you'll get the
> chance to share your
>       opinions on IT & business topics through brief
> surveys-and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
>       _______________________________________________
>       iText-questions mailing list
>       [email protected]
>       https://lists.sourceforge.net/lists/listinfo/itext-questions
>       Buy the iText book: http://itext.ugent.be/itext-in-action/
>
>
>
>


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão
desta mensagem não significa a perca de confidencialidade. Se esta mensagem
for recebida por engano, por favor envie-a de volta para o remetente e
apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o
destinatário de usar, revelar ou distribuir qualquer parte desta mensagem.

Disclaimer:
This message is destined exclusively to the intended receiver. It may
contain confidential or legally protected information. The incorrect
transmission of this message does not mean the loss of its confidentiality.
If this message is received by mistake, please send it back to the sender
and delete it from your system immediately. It is forbidden to any person
who is not the intended receiver to use, distribute or copy any part of this
message.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to