The information is the book is correct but what you are trying to do is
to nest tables and the behavior is a bit different. The corrected code
is:

            Dim table As New PdfPTable(2)

            Dim t1 As New PdfPTable(1)
            t1.DefaultCell.BorderWidth = 0
            t1.DefaultCell.BorderWidthBottom = 1
            t1.WidthPercentage = 100
            Dim t2 As New PdfPTable(1)
            t2.DefaultCell.BorderWidth = 0
            t2.DefaultCell.BorderWidthBottom = 1
            t2.WidthPercentage = 100

            t1.AddCell("line 1")
            t1.AddCell("line 2")
            t1.AddCell("line 3")
            t1.AddCell("line 4")

            t2.AddCell("line 1")
            t2.AddCell("line 2")

            Dim c As New PdfPCell
            c.Padding = 0
            c.BorderWidth = 0
            c.AddElement(t1)

            table.AddCell(c)
            c = New PdfPCell
            c.Padding = 0
            c.BorderWidth = 0
            c.AddElement(t2)
            table.AddCell(c)


Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Rick Roen
> Sent: Monday, April 02, 2007 1:54 PM
> To: 'Post all your questions about iText here'
> Subject: Re: [iText-questions] PdfPTable extendlastrow
> 
> Here is a function you can call from your document that shows 
> the problem.
> For me this shows "line 2" of the right table filling the 
> entire height so
> the borderbottom is at the same level as "line 4" for the left table.
> 
>         Private Function gettest() As PdfPTable
>             Dim table As New PdfPTable(2)
>             table.DefaultCell.BorderWidth = 0
> 
>             Dim t1 As New PdfPTable(1)
>             t1.DefaultCell.BorderWidth = 0
>             t1.DefaultCell.BorderWidthBottom = 1
>             Dim t2 As New PdfPTable(1)
>             t2.DefaultCell.BorderWidth = 0
>             t2.DefaultCell.BorderWidthBottom = 1
>             t2.ExtendLastRow = False
> 
>             t1.AddCell("line 1")
>             t1.AddCell("line 2")
>             t1.AddCell("line 3")
>             t1.AddCell("line 4")
> 
>             t2.AddCell("line 1")
>             t2.AddCell("line 2")
>             table.AddCell(t1)
>             table.AddCell(t2)
> 
>             Return table
>         End Function
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Paulo
> Soares
> Sent: Monday, April 02, 2007 6:05 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] PdfPTable extendlastrow
> 
> You'll have to provide more code so that the problem can be 
> reproduced.
> 
> Paulo 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On 
> > Behalf Of Rick Roen
> > Sent: Monday, April 02, 2007 11:13 AM
> > To: [email protected]
> > Subject: [iText-questions] PdfPTable extendlastrow
> > 
> > I have a PdfPTable width 100% with two columns. In the left 
> > col I have a PdfPTable with several rows of information.  On 
> > the right col I have a PdfPTable with a few rows of 
> > information, but this table is shorted than the left table.
> > 
> 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/
> 


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/

Reply via email to