Yes, that works!
 
I saw it in the javadocs but didn't understand well. It’s not very clear because in the doc the other rows (data rows) are not mentioned. But now it's beautiful.
 
Just a last question, the data table is split on several pages (and that’s what I want!) but the last row on each page is extended to the end of the master table. I don’t think that dataTable.setExtendLastRow(false) will work because this is not the last row of the table but the last row of the page. What can I do?
 
ER


Paulo Soares <[EMAIL PROTECTED]> a écrit :
You should have:

Row 0 and 1 for the header,
Row 2 for the footer
Row 3 for the datas (which contains a subtable with many rows)

You should set:

masterTable.setHeaderRows(3);
masterTable.setFooterRows(1);

This is explained in the javadocs at http://itextdocs.lowagie.com/docs/com/lowagie/text/pdf/PdfPTable.html#setFooterRows(int)

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Eric Rosaz
> Sent: Wednesday, November 15, 2006 11:05 AM
> To: [email protected]
> Subject: [iText-questions] setFooterRows
>
> Hi,
>
> I have a PdfPTable with 4 rows.
> Row 0 and 1 for the header,
> Row 2 for the datas (which contains a subtable with many rows)
> Row 3 for the footer
>
> Here is my code for the header:
> PdfPTable masterTable = new PdfPTable(1);
> masterTable.addCell(headerCell1);
> masterTable.addCell(headerCell2);
> masterTable.addCell(dataTable);
> masterTable.addCell(footerCell);
> masterTable.setTotalWidth(PageSize.A4.rotate().width());
> masterTable.setHeaderRows(2);
>
> And the result is very good. But for the footer i don't know
> how to do. I try the folowing:
> PdfPTable masterTable = new PdfPTable(1);
> masterTable.addCell(headerCell1);
> masterTable.addCell(headerCell2);
> masterTable.addCell(dataTable);
> masterTable.addCell(footerCell);
> masterTable.setTotalWidth(PageSize.A4.rotate().width());
> masterTable.setHeaderRows(4);
> masterTable.setFooterRows(1);
> I don't konw waht happen but i know that it's not what i
> want. I want the 2 first row of the master table for the
> header and the last row of the master table for the footer.
> Is it possible tot do that?
>
> thk
> ER
>
> ________________________________
>
> Découvrez une nouvelle façon d'obtenir des réponses à toutes
> vos questions ! Profitez des connaissances, des opinions et
> des expériences des internautes sur Yahoo! Questions/Réponses
> .
>


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/


Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
-------------------------------------------------------------------------
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