Take a survey

Developing Applications Using APIs > Assembling PDF Documents > Setting Page Properties > Page size and rotation > Rotation and orientation

Rotation and orientation
You can use the PageRotation element to change the rotation angle of a page. The rotate90 attribute specifies the rotation angle in increments of 90 degrees, where a positive value is clockwise rotation and a negative value is counterclockwise. This rotation is absolute, not relative. That is, a rotate90 value of 90 means that the page rotation (which corresponds to the /Rotate entry of the PDF page dictionary) is 90 degrees, not that it is 90 degrees more than what it was previously. For example, if the original rotation angle was 90 and you specify 90 in the PageRotation element, there is no change.
If you specify a rotation value other than 0, the Assembler service assumes that the pages are set the way you want to view them. For example, when you add a footer to a rotated page, the footer will be at the bottom of the newly oriented page.
Example: Specifying a rotation angle
<PDF result="newdoc">
	<PDF source="doc1">
		<PageRotation rotate90="90"/>
		<Footer styleReference="myStyle"/>
	</PDF>
</PDF>
These figures illustrate how the source page looks before and after rotation and application of the footer.
It is important to keep in mind the relationship of this to the PageSize value. If you change PageRotation, the effective page size (which would be returned by the DocumentInformation query) will change. However, if you change PageSize, the rotation (as returned by DocumentInformation) does not change.
For purposes of this discussion, the following terms are used:
A portrait page is one whose width is less than or equal to its height.
A landscape page is one whose width is greater than its height.
If you specify a page size for your document, it is possible that some of the pages will have a different orientation from the specified one. To control what happens, you can set the select attribute of the PageSize element to one of the following values:
Auto: The orientation of each page is preserved if the page size is changed. If the specified orientation does not match the existing orientation of a page, this means that the specified width and height values for PageSize are effectively swapped. For example, if the page size is 8.5 x 11 and the new page size is specified as 14 x 8.5, the effective page size becomes 8.5 x 14 so that the orientation is preserved.
Portrait: The new values apply only to pages that are already in portrait mode. For example, if the old page size is 11 x 8.5 (landscape) and the new page size is 8.5 x 14, the page size is not changed.
Landscape: The new values apply only to pages that are already in landscape mode. For example, if the old page size is 8.5 x 11 (portrait) and the new page size is 14 x 8.5, the page size is not changed.
All: The new values apply to all pages regardless of their previous orientation.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/assemblePDFPage_properties.102.5.html