Thanks for your answer. I see what you mean.
Could you show me to some example about using PdfTemplate and ColumnText together?



1T3XT info escribió:
Daniel H. Ardison wrote:
  
I want to provide a Header for my PDF Document, which shows information 
about filters applied to obtain the report results.
    

You want to create a document with several pages.
The actual content of each page consists of report data.
The header shows meta-information about that data.

  
Because filters depends on user selection the number of filters could 
vary and so the length of the header will vary acording to the number of 
filters the user selects.
    

The meta-information can vary from document to document,
within the document, the header is identical for each page.

  
According to documentation a read,  the top margin should be defined 
according to the size of the header.
The question is: How can I calculate the top margin when the header 
height has variable length?
    

Create a PdfTemplate that has the same size as each page.
Add the meta-data to this PdfTemplate using ColumnText.
Ask ColumnText for the Y position AFTER the meta-data has been added.
(This can be done with the getYLine() method.)
Use that value to define your margins,
and use PdfTemplate in onEndPage so that the header is added
to each page.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
  

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to