Page Margin Issues

Page Margin Issues

Forum member · Jul 3, 2008
Hi, I'm generating a PDF document with left, right and bottom margin as 50.4F and top margin as 20F. PDF document consists of a single table. Now the problem is when table grows in size and covers upto 80% of the page, the top margin changes to nearly 8F and bottom margin changes to nearly 65F. Is there any way by which I can make the margins consistent even when the content in the page grows bigger? Thanks, Johny Varghese

Re: Page Margin Issues

Support · Jul 3, 2008
Hello Johny, The margins do not change according to the content you have on the page. The margins will be fixed and the data will be added to the page without effecting the margins. Can you please send over a sample code to our [^a|mailto:support@cete.com|Support Team^] so that they can take a look at it to find out what is causing this behavior. Thanks, ceTe Software Support Team.

Re: Page Margin Issues

Forum member · Jul 7, 2008
Hi, Adding on to my query, I found that inconsistent page margin occurs only when I've page scaling in printer settings as "None". Thanks, Johny Varghese

Re: Page Margin Issues

Support · Jul 8, 2008
Hello Johny, Are you seeing the behavior of change in the margins when opening the PDF in the Acrobat reader or after printing the PDF document in a printer? We are unable to create this behavior. Following is the code we used for this. Document document = new Document(); Page page = new Page(PageSize.Letter, PageOrientation.Portrait, 50F); page.Elements.Add(new LayoutGrid()); Rectangle rectangle = new Rectangle(0, 0, page.Dimensions.Body.Width, page.Dimensions.Body.Height); string str = "ceTe Software "; for (int i = 0; i < 10; i++) { str = str + str; } TextArea area = new TextArea(str, 0, 0, page.Dimensions.Body.Width, page.Dimensions.Body.Height); page.Elements.Add(rectangle); page.Elements.Add(area); document.Pages.Add(page); document.DrawToWeb(); In the above code if you have the TextArea's width or height more than the body width or height of the page then the text will be displayed outside the margins, you will have to take care of the height and width of the elements you are adding to the page. If you have any problem in printing the PDF then please try updating the printer drivers and see if it solves your problem. If you still have problem then please send over a small sample code to our [^a|mailto:support@cete.com|Support Team^] which we can use to recreate the behavior and the output PDF so that we can take a look at it. Thanks, ceTe Software Support Team.