BorO :: Qnab System AB wrote:
> Hello!
>  
> I have read almost all tutorials and the book but I can't figure out how 
> to have a bigger header and make a table like in this tutorial 
> http://itextdocs.lowagie.com/examples/com/lowagie/examples/objects/tables/AddBigTable.java
>  
> 
> My header is about 4cm high.
> Table that I add to the document starts at about 2cm from the top on the 
> fist page. But on the second page the table start right on the beginning.
>  
> On both pages my header is drawn over the table.
>  
> What I want is simple bigger header and then add a big table that comes 
> on right position.
> Is this possible?

There are two ways to do it.

I assume you are using the header with page events?

You could make sure you have enough room for the header
by changing the top margin: see page 35 (or p38).
This is advised if you work with document.add().

Or you could follow the advice given in the first
paragraph of p185: wrap the PdfPTable in a ColumnText
object. There was an example in one of the early versions
of the book, but it was removed because of the order of
the chapters: ColumnText is discussed after PdfPTable.
However, you can find the example in the bonus section
of Chapter 6; it is called TablesInColumns:
http://itext.ugent.be/itext-in-action/chapter.php?chapter=6#bonus
The table is positioned using setSimpleColumn (see chapter 7).

HTH,
Bruno

-------------------------------------------------------------------------
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