Hi,
i'm programming VB6 and use the newest release of Generator for COM/Active V5 but Generator V5 is not selectable in the product selector for this thread.
The problem:
Source is a PDF document generated with Adobe Acrobat. The document contains 4 pages. First page has landscape orientation the others have portrait orientation.(Acrobat shows correctly different height and width for landscape and portrait pages)
It seems that after importing first page (=landscape orientation) of this document via
Set MyPageData = NewTargetPage.AddImportedPageData(Source, 1, 0, 0)
the width and height and angle of the imported page represented by MyPageData are like a portrait orientation and are still the same for the other imported pages. There is no change.
Is there a way to detect the real orientation of the imported page ?
Best regards
Orientation of imported pages
Re: Orientation of imported pages
Support · Jul 16, 2009Hello,
In order to get the orientation of a page you will have to compare the Height and Width of the page. If the width of the page is more than the height then it is in landscape mode. By checking the height and width of the imported page you can find the page orientation.
Thanks,
ceTe Software Support Team.
Re: Orientation of imported pages
Forum member · Jul 16, 2009Hello,
i created the page in Acrobat by making a DIN A4 portrait page and rotate it by 90 degrees clockwise, So i got the landscape oriented page. Then i saved it to a file.
Acrobat shows this page as a landscape page and shows also that width value is bigger than height value. That's ok.
When i import this page from the Acrobat file via ImportedPageData the height and width values of the imported page are like the values of a portrait page (width smaller than height) but should be as in Acrobat (width value is bigger than height).
Could you please check this ?
Re: Orientation of imported pages
Support · Jul 16, 2009Hello,
It shows that you have a potrait page with a rotation in it. Rotating a page does not make it landscape, but it looks like landscape as it is rotated. YOu will have to check if the page is rotated in your case. You can get the rotation value by using the Rotate property.
int rotation = mergeDocument.Pages[0].Rotate;
If you want to rotate the current page then you can rotate it by using the Rotate property of the page.
Thanks,
ceTe Software Support Team.