How to Rotate and Auto Rotate PDF Pages with PDF.co and Make

9 Minutes Read

In this tutorial, we’ll demonstrate how to rotate specific pages and automatically fix rotated pages in a PDF using PDF.co and Make. We’ll start with a sample PDF containing 5 pages and guide you through selecting individual pages to rotate to specific angles, as well as how to fix any incorrectly rotated pages. Below is the sample PDF we’ll be using:

Sample PDF
Sample PDF

Step 1: Google Drive Download a File

Let's utilize the Google Drive module and choose the 'Download a file' feature to retrieve the PDF file you need to process.

Google Drive Download a File

Step 2: Setting up Google Drive

  • Choose the "Select from the list" option to enter a File ID.
  • Select "My Drive" as the Drive to be used.
  • Enter the folder and file name you would like to use.
Setting up Google Drive

Step 3: PDF.co API Call

Next, add the PDF.co API Call feature to call an API endpoint that will be used in the process.

PDF.co API Call

Step 4: Setup Make API Call Configuration

  • First, connect our PDF.co account by adding your API Key, which you can find in your dashboard.
  • Next, include the rotate pages API endpoint v1/pdf/edit/rotate. This endpoint will allow you to rotate specific pages within the PDF file. You can access the endpoint through our developer documentation.
  • Select the input type as Upload files and inject param as url option to automatically upload the file from Google Drive.
  • Then, add the Body parameters, which should include the pages and angle keys along with their respective values. You can set the angle to your desired preference (90, 180, 270 degrees) and specify the pages you wish to rotate.
Setup Make API Call Configuration
Setup Make API Call Configuration 2
Setup Make API Call Configuration

Step 5: Run Scenario to Rotate PDF Pages

After setting everything up, run the scenario to rotate the specific PDF pages. Then, copy the URL provided and paste it into your browser to view the rotated pages.

Run Scenario to Rotate PDF Pages

Step 6: Generated Rotated PDF Pages

Here's the result after successfully rotating the selected pages in the PDF document.

Rotated PDF Pages

Now that we've finished rotating specific pages in the PDF document, we will add another PDF.co app to automatically fix the rotated pages.

Step 7: Add Make API Call

Let's use another PDF.co API Call feature to call an API endpoint that will automatically fix the rotated PDF pages.

Add Make API Call

Step 8: Setup Make API Call Configuration

  • First, add the auto-rotate pages API endpoint v1/pdf/edit/rotate/auto. This endpoint will correct rotated PDF pages, whether they are sideways or upside-down. You can access the endpoint at our developer documentation.
  • Choose the input type as Upload files and inject param as url option to automatically upload the file from PDF.co Rotate Pages.
Setup Make API Call Configuration
Setup Make API Call Configuration 2

Step 9: Run Scenario to Auto Rotate PDF Pages

After setting up, run the scenario to automatically rotate the PDF pages. Then, copy the provided URL and paste it into your browser to view the output.

Run Scenario to Auto Rotate PDF Pages

Step 10: Auto Rotate Pages Output

Here's the result after successfully auto-correcting the rotated pages in the PDF document.

Auto Rotate Pages Output

To ensure convenient future access to the file generated by the PDF.co API, we can store it in a cloud storage platform such as Google Drive or any other preferred service. This will securely save the file, allowing for permanent storage and easy retrieval whenever needed.

Step 11: Google Drive Upload File

We will now integrate the Google Drive module for uploading the output file and directly saving the generated file to our Google Drive folder.

Google Drive Upload File

Step 12: Setup Upload File

  • Provide the Folder ID in the designated field and select the "Select from list" option.
  • Choose "My Drive" as the New Drive Location.
  • Specify the Folder Name as the New Folder Location.
  • Then, select the file you want to upload in the Google Drive folder.
Setup Upload File

Step 13: Run Scenario to Upload File

After you are done configuring the settings, proceed to run the scenario. Then, open your Google Drive folder to view the uploaded file.

Run Scenario to Upload File

Step 14: Uploaded File in Google Drive

Here is the uploaded file in the Google Drive folder.

Uploaded File in Google Drive

In this tutorial, you learned how to rotate and auto-rotate PDF pages using Make and the PDF.co Web API endpoints.

Video Guide

Related Tutorials

See Related Tutorials