I was hoping to use the setSkipFirstHeader() method to display a
'continued - from last page' header row when a table is split across
pages. ( as suggested in the Manning - itext In Action 2nd edition book
section 4.3.1.)

 

The pdf document that I'm producing has several tables of variable
length, so it is possible that any of these tables could begin on a new
page. When this happens I get the first header row ('continued - from
last page') and the standard header row displayed together.

 

I've added a code snippet below to try and clarify what I'm attempting
to do.

 

PdfPTable table = new PdfPTable(1);

      table.setHeaderRows(1);

      table.setSkipFirstHeader(true);

      table.addCell(createSectionHeaderRow (table, "ADDITIONAL
CONDITIONS/WARRANTIES continued..."));

      table.addCell(createSectionHeaderRow (table, "ADDITIONAL
CONDITIONS/WARRANTIES"));

 

    private void createSectionHeaderRow(PdfPTable table, String title) {

        PdfPCell headerCell = new PdfPCell(new Phrase(new Chunk(title,
SECTION_FONT)));

        headerCell.setFixedHeight(20);

        headerCell.setColspan(table.getNumberOfColumns());

        headerCell.setBorderWidth(0.75f);

        headerCell.setPaddingBottom(8f);

        headerCell.setBorder(PdfTable.BOTTOM);

        table.addCell(headerCell);

    }

 

 

From: Jason Berk [mailto:[email protected]] 
Sent: 08 April 2011 17:18
To: Post all your questions about iText here
Subject: Re: [iText-questions] Problems using skipFirstHeader for
atabledisplayed on a new page.

 

I believe that's be design.  SkipFirstHeader will be ignored if the
table is the first/only item added via doc.add( )

 

Jason

 

From: Palmer, Richard [mailto:[email protected]] 
Sent: Friday, April 08, 2011 11:42 AM
To: [email protected]
Subject: [iText-questions] Problems using skipFirstHeader for a
tabledisplayed on a new page.

 

Are there any known issues with the use of setSkipFirstHeader when the
PdfPTable in question is displayed on a new page?

 

I've created a pdfptable that has one header  row but even with the
SkipFirstHeader property set to true I still see this header row on the
first page.

 

It works fine if the table is not the first element on the page. 

 

I am currently using iText 2.1.7.

 

Any  help would be much appreciated.

 

 


________________________________________________________
This e-mail is confidential and intended solely for the use of the
individual(s) to whom it is addressed. If you are not the intended
recipient, be advised that you have received this e-mail in error and
that any use, dissemination, forwarding, printing, copying of, or any
action taken in reliance upon it, is strictly prohibited and may be
illegal.
Catlin Underwriting Agencies Limited, Catlin Insurance Company (UK) Ltd.
and Catlin (Wellington) Underwriting Agencies Limited are authorised and
regulated by the Financial Services Authority.
The registered office of Catlin Underwriting Agencies Limited
(incorporated and registered in England and Wales with company number
1815126) and Catlin Insurance Company (UK) Ltd. (incorporated and
registered in England and Wales with company number 5328622 ) is 20
Gracechurch Street, London, EC3V 0BG. 

Catlin Risk Solutions Limited is an Appointed Representative of Catlin
Underwriting Agencies Limited.
________________________________________________________

This is a transmission from Purdue Federal Credit Union (Purdue Federal)
and is intended solely for its authorized recipient(s), and may contain
information that is confidential and or legally privileged. If you are
not an addressee, or the employee or agent responsible for delivering it
to an addressee, you are hereby notified that any use, dissemination,
distribution, publication or copying of the information contained in
this email is strictly prohibited. If you have received this
transmission in error, please notify us by telephoning (765)497-3328 or
returning the email. You are then instructed to delete the information
from your computer. Thank you for your cooperation.
 

________________________________________________________
This e-mail is confidential and intended solely for the use of the 
individual(s) to whom it is addressed. If you are not the intended recipient, 
be advised that you have received this e-mail in error and that any use, 
dissemination, forwarding, printing, copying of, or any action taken in 
reliance upon it, is strictly prohibited and may be illegal.
Catlin Underwriting Agencies Limited, Catlin Insurance Company (UK) Ltd. and 
Catlin (Wellington) Underwriting Agencies Limited are authorised and regulated 
by the Financial Services Authority.
The registered office of Catlin Underwriting Agencies Limited (incorporated and 
registered in England and Wales with company number 1815126) and Catlin 
Insurance Company (UK) Ltd. (incorporated and registered in England and Wales 
with company number 5328622 ) is 20 Gracechurch Street, London, EC3V 0BG. 

Catlin Risk Solutions Limited is an Appointed Representative of Catlin 
Underwriting Agencies Limited.
________________________________________________________
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to