Y offset of ImportedPageArea

Y offset of ImportedPageArea

Forum member · Mar 8, 2007
it seems that every ImportedPageArea needs about a -55 Y value to sit in a same-sized page properly. that is: if i import an 8.5" x 11" PDF and place in on an 8.5" x 11" page, it's about 55 points south of where it should be. why?

Re: Y offset of ImportedPageArea

Support · Mar 8, 2007
Hello, The reason you are seeing this offset is because the default margins for all four sides of the page is set to 54 points. You can reset the margins for the page to 0 and then add the ImportedPage to it and that will solve your problem. There are two ways you can set the margins on the page. Set all margins at once: C# Code: Page page = new Page( PageSize size, PageDimesnions dimensions, 0 ); VB.NET Code: Dim MyPage As Page = New Page(ByVal size As PageSize, ByVal dimensions As PageDimensions, 0) Set margins individually: C# Code: 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 ); VB.NET Code: Dim dimensions As PageDimensions = 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 Dim MyPage As Page = New Page(dimensions) Thanks, ceTe Software Support Team

Re: Y offset of ImportedPageArea

Forum member · Mar 8, 2007
of course. however, it does seem strange that things placed at 0,0 would appear at 54,54. i guess it's a security feature to keep attackers from knowing where page elements really are. ;~)