§ Mark and adjust
Rotate PDF API
Rotate the whole document or only the pages you name. Negative values turn anticlockwise. Useful straight after a scanner that fed half the stack the wrong way up.
- Endpoint
- POST /pdf/rotate
- Inputs
- Exactly 1 PDF
- Returns
- application/pdf
- Limits
- 20 MB per file, 3,000 pages.
- Price
- $0.001
§ 01 The request
One POST, and the file comes back.
POST /pdf/rotate
curl -sS --fail-with-body \
-o rotated.pdf \
-H "Authorization: Bearer $OHMYWRAP_KEY" \
-F "file=@scan.pdf" \
-F 'options={"rotation":-90,"pages":["2-3"]}' \
https://api.ohmywrap.com/pdf/rotateOptions
| Option | Type | Default | What it does |
|---|---|---|---|
| rotationrequired | int | — | Non-zero multiple of 90. Negative turns anticlockwise. |
| pages | string[] | all pages | Page selection: "2", "2-4", "odd", "even", "3-", "-2". Ranges are clamped to the document. |
Worth knowing
A rotation of 45 is 422 invalid_rotation. Multiples of 90 only, and zero is not one of them.
Your first /pdf/rotate call takes one line of curl.
Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.
10,000 calls for $10. No subscription, no expiry.