Free plan
Auto-rotate pages
Turn sideways or upside-down scanned pages the right way up
About this tool
This tool finds pages that were scanned sideways or upside down and turns them upright. By default it reads the text on each page to work out which way is up, so the page needs real text. You can instead turn every wide page, or every tall page, by a quarter turn. A preview option shows which pages would be turned without changing anything.
For example, you fix a scan where some pages came out rotated.
How to use it
- Choose this tool.
- Add your PDF with Upload or drag and drop.
- Choose how to find the right way up: from the text, or turn all wide or all tall pages.
- Optionally choose which pages to check.
- Press Generate, then download the PDF.
What you get back
You get a new PDF with the pages upright. If you only preview, you get a list of the pages that would be turned.
GOOD TO KNOW
The turn is stored in the page rotation; the page content is not redrawn. A page with too little text cannot be detected and is left alone. Counts as one PDF operation.
TEST IT LIVE
Try Auto-rotate pages in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/auto-rotate
Tool ID
pdfs.auto-rotate
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/auto-rotate" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'pages=1-3' \
-F 'mode=osd' \
-F 'min_confidence=2'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.autoRotate({
"file": 'document.pdf',
"pages": "1-3",
"mode": "osd",
"min_confidence": 2
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->autoRotate([
'file' => 'document.pdf',
'pages' => '1-3',
'mode' => 'osd',
'min_confidence' => 2,
]);
echo $result->requestId;More in PDFs
