PdfPTable can't be added to any element.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Patrick Valsecchi
> Sent: Friday, September 12, 2008 3:34 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] onGenericTag called way too early
>
> Hi,
>
> On Friday 12 September 2008 11.44:39 Paulo Soares wrote:
> > There are lots of layers when using complex objects. You
> should draw your
> > background with PdfPCellEvent, probably.
>
> Works great, but not when the PdfPTable is added into a
> Phrase. It acts like
> the table was never added... but if I look into the Phrase
> after insertion, I
> can see the PdfPTable element in it.
>
> There is even a piece of code in the Phrase.add() method that
> makes me think
> it's supposed to be supported:
> case Element.PTABLE: // case added by mr.
> Karen Vardanyan
> // This will only work for PDF!!! Not
> for RTF/HTML
>
> Here is the code I use to create the table:
> ================
> public static PdfPTable createPlaceholderTable(double width,
> double height, PdfPTableEvent drawer) {
> PdfPTable placeHolderTable = new PdfPTable(1);
> placeHolderTable.setLockedWidth(true);
> placeHolderTable.setTotalWidth((float) width);
> final PdfPCell placeHolderCell = new PdfPCell();
> placeHolderCell.setMinimumHeight((float) height);
> placeHolderCell.setPadding(0f);
> placeHolderCell.setBorder(PdfPCell.NO_BORDER);
> placeHolderTable.addCell(placeHolderCell);
> placeHolderTable.setTableEvent(drawer);
> placeHolderTable.setComplete(true);
> return placeHolderTable;
> }
> ================
>
> It works if I insert that into another cell/table, in the
> document, but not in
> a Phrase.
>
> Any idea?
>
> Thanks
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.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php