Table that fits the whole Page

Table that fits the whole Page

Forum member · Nov 14, 2005
Hi, I need to create a Table that fits the whole Page (without margins). To do this I explicitly set all margins of the Page to 0. When I create the Table with Width=Page.Dimensions.Width (so Heigth) and position (0,0) there is some redundant margin at the bottom of the Page (about 50 points). As a result 3 rows are moved to the 2nd page, but they can be holded in the 1st page. Any idea of where this extra field was originated? How can I get rid of it? Thanks, Olga

Re: Table that fits the whole Page

Support · Nov 14, 2005
Hello Olga, Make sure you are setting all the margins to 0. There are two ways you can set the margins on the page. Set all margins at once: Page page = new Page( PageSize size, PageDimesnions dimensions, 0 ); Set margins individually: PageDimensions dimensions = new PageDimensions( PageSize.Letter, PageOrientation.Portrait ); dimensions.BottomMargin = 0; dimensions.TopMargin = 0; dimensions.LeftMargin = 0; dimensions.RightMargin = 0; // Create a page using a page dimensions object and add it to the document Page page = new Page( dimensions ); Then create a Table object as follows: Table table = new Table(0, 0, Page.Dimensions.Width, Page.Dimensions.Height ) If you still continue experiencing the behavior you mentioned, please send us over your code at [^a|mailto:support@cete.com|Support^] and we will look into it further. Also feel free to post any further questions. Thanks, ceTe Software Support Team.