How to Rotate All PDF Content 90 Degrees (or more) in Power Automate
Rotating PDF pages can be a page-by-page problem, and it can also be a “uh-oh, every single page in this file is rotated incorrectly” problem.
Fixing PDF page rotations in Power Automate
In a previous article, we talked about fixing this problem in Power Automate specifically for a range of incorrectly rotated pages in a PDF document. But what about fixing the entire file at once?
As it turns out, there’s a better solution for that problem than selecting a range of pages — and we’ll find that solution on the Cloudmersive PDF API connector actions list once again.
Below, we’ll walk through a quick instant cloud flow that fixes a PDF with pages rotated -90 degrees.
Create a manually triggered Instant cloud flow
As usual, we’ll start by setting up our instant cloud flow with a manual trigger.
In our manual trigger step, we’ll create a file input field that asks flow users to upload a PDF document.
Find the Cloudmersive PDF connector
Next, we’ll search the Power Automate connector library for Cloudmersive connectors, and we’ll locate the PDF connector (this has a pink logo).
After we click “See more” to view the actions list, we’ll locate an action called Rotate all pages in a PDF document.
Create a Cloudmersive PDF API connection
After we select this action, we’ll create our connection with a connection name & Cloudmersive API key. We can get an API key for free (800 API calls/month) by creating a free account on the Cloudmersive website.
Configure the PDF rotation request
To configure our PDF rotation request, we’ll first pass dynamic content from our manual file input trigger to each of our initial Input file & (file name) request parameters.
Next, we’ll enter a multiple of 90 degrees in the angle to rotate parameter. In this example, we’re fixing a -90 rotation, so we’ll enter 90 into this parameter (note — to handle this part dynamically with user input, we could create another manual trigger input that asks for a multiple of 90 & pass that to this parameter).
Save the new PDF file
To save our fixed-rotation file in SharePoint, we’ll use Create file action.
Test the flow (with an example PDF doc)
We’ll now save and test our flow by selecting an example PDF document from our system.
When our flow finishes running, we’ll find our PDF with correctly rotated pages in our SharePoint folder.
And that’s all there is to it! We can now easily fix PDF page rotation issues with a quick Power Automate flow.
Conclusion
In this article, we learned how to build a Power Automate flow that rotates PDF pages by multiples of 90 degrees. In a prior article, we learned how to perform a similar action that rotates a specific range of PDF pages instead. Both solutions can be used to solve annoying PDF page rotation problems without a dedicated PDF reader application.
If you’re interested in learning about more Cloudmersive API connectors in Power Automate, don’t forget to follow this blog!