Rotating Page and Imported Content

Rotating Page and Imported Content

Forum member · Jun 24, 2008
I have an original PDF document that when opened with reader, displays the document as a letter size lanscape view. When I import the content from this pdf as below ceTe.DynamicPDF.Page page_1 = new ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Landscape, 0 ); page_1.Elements.Add( new ImportedPageArea(sImportPath, 1, 0, 0)); the pdf import in the portrait view...so with that said i decided to rotate the page and all looks well...until... I try to add another page element (logo in this case) then the x, y origins are all off, since the page has been rotated. How can I rotate the imported page content 90 degrees before I add to page? And if this can be done with the logo page element then be true to the X,Y origin via the Elements.Add Method arguments... Note: I think that the issue is the original author of the pdf document set up the document as an 8.5 x 11 portrait but then at some point decided to rotate to lanscape view before saving the document....not sure if this has relevance but thought I would throw it out there. Thanks in advance.

Re: Rotating Page and Imported Content

Support · Jun 25, 2008
Hello, If you rotate the page by 90 degrees or if you are merging a PDF which has rotated pages then you will have to take care of the X, Y position of the elements adding to it. Basically what is happening is the PDF is getting written out from bottom to top and then it is all getting rotated 90 degrees (to appear in landscape). This is a very uncommon way to create PDFs and our product will always draw out the page elements in this way. Our product draws out the page elements left to right and then when the entire PDF gets rotated 90 degrees it rotates the text as well. To compensate for this you will need to readjust the X, Y coordinates, switch the height and width and then rotate the elements you are adding to -90 degrees. Thanks, ceTe Software Support Team.