PDF Automation Station

PDF Automation Station

Positioning PDF Stamps Programmatically Part IV

Adjusting for page rotation

David Dagley's avatar
David Dagley
Jul 12, 2025
∙ Paid
Share

PDF pages can be rotated 0, 90, 180, or 270 degrees. To rotate pages with the user interface (UI), simply open the pages panel, select a page or a group of pages, right-click and select Rotate pages. You can also press Ctrl + Shift + R on the keyboard to open the page rotation UI.

Adobe Acrobat Page Rotation User Interface

When a page is not rotated (0 degrees), and it gets rotated clockwise by 90 degrees, the page rotation is 90 degrees, continuing clockwise by 90-degree increments produces rotations of 180, 270, and back to 0. You can also change page rotations with a script. The document setPageRotations( ) method takes four input parameters:

  1. nStart - The zero-based start page of the range of pages to rotate.

  2. nEnd - The zero-based end page of the range of pages to rotate.

  3. nRotate - The degrees of rotation (0, 90, 180, 270).

/*The following script sets the page rotation of pages 1 through 10 to 90° */

this.setPageRotations(0, 9, 90);

Is The Page Rotated?

A page might appear as “landscape” view, but depending on how it was produced, it could have any page rotation. It could be a portrait 8.5" x 11" page rotated 90 degrees. It could also be an 11" x 8.5" page with a degree rotation of zero. I have even seen pages with 180° rotation (upside down) that look right-side up because of the way they were fed through a scanner, coming out upside-down with zero rotation, then rotated to right-side up with 180° rotation.

Get the course above, and a suite of automation tools for FREE with a Professional subscription.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 David Dagley
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture