Dear
I have an issue with the correct positioning of importedpagecontent.
I'm generating A4-size PDF's that needs to include dynamicaly added advertisements. These advertisements are half A4 page big and can be placed on top or bottom of the page according to the settings in the database.
The source of those half page advertisements are PDF's who already have the correct size (half A4, so A5 but with correct landscape positioning).
The code to import is very straightforward.
<code>
_contents = new ImportedPageContents(_somefullPathToAdvert ,1);
page.Elements.Add(new ImportedPageData(_contents, 0,0));
</code>
As you can notice I'm placing the new content at postion (0,0). So starting at top left corner. Strangly enough the imported advertisment shows centered in the page. When I check the sizeof the imported content, in debug, the sizes look correct. The height of the imported content is indeed half the size of A4 page, but still the content is misplaced 1/4 down of where it should be.
Any idea?
ImportedPageContent not positioning correctly
Re: ImportedPageContent not positioning correctly
Support · Dec 19, 2007Hello,
When using ImportedPageContents the content gets added relative to the center of the page. You can try using ImportedPageArea and that will add the contents relative to the top left corner of the page.
Thanks,
ceTe Software Support Team