Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Calulate document area size with Header and Footer (Read 3386 times)
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Calulate document area size with Header and Footer
May 3rd, 2007 at 11:54am
Print Post  
   Hi,

I need to build a table wich fit to only one page with regular row height :

     Row.Height = (Document.Height - Document.Margin.Top - Document.Margin.Bottom) / RowCount

This formula work, but when I set Header and Footer, it doesn't. The new formula is :

     Row.Height = (Document.Height - Document.Margin.Top - Document.Margin.Bottom - Document.Header.Height - Document.Footer.Height) / RowCount

But it doesn't work to, the table is set on 2 pages.

How can I know the real document content area size ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Calulate document area size with Header and Fo
Reply #1 - May 3rd, 2007 at 12:07pm
Print Post  
Hi,

What is the type of that Document object? You could get some rounding error If the expression within the parentheses returns an integer value, so try casting the result to float before dividing by RowCount.

Stoyan
  
Back to top
 
IP Logged
 
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Re: Calulate document area size with Header and Fo
Reply #2 - May 3rd, 2007 at 12:29pm
Print Post  
The document type is com.lowagie.text.Document and the formula variable are single. I think the real trouble is that Document.Header.Height and Document.Footer.Height does not correspond to the real Header and Footer height so the calcul of the real document content area is not right.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Calulate document area size with Header and Fo
Reply #3 - May 3rd, 2007 at 12:32pm
Print Post  
The flowchart adds its own margins when printing. Maybe you should set them to 0, using the FlowChart.PrintOptions.Margins member?
  
Back to top
 
IP Logged
 
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Re: Calulate document area size with Header and Fo
Reply #4 - May 3rd, 2007 at 12:32pm
Print Post  
I think the real trouble is that Document.Header.Height and Document.Footer.Height does not represent the real header and footer height.

So How can I know the real height of the header and footer ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Calulate document area size with Header and Fo
Reply #5 - May 3rd, 2007 at 1:29pm
Print Post  
Have you tried the suggestion above?
  
Back to top
 
IP Logged
 
belfaigore
YaBB Newbies
*
Offline


Life is so wonderfull

Posts: 19
Joined: Apr 11th, 2007
Re: Calulate document area size with Header and Fo
Reply #6 - May 4th, 2007 at 6:08am
Print Post  
Lips Sealed Sorry, I make confusion between forum support, in this post I'am talking about iText and not about FlowChart. Can You delete the post ?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint