Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
This node operation "Rotate Page" allows users to rotate specific pages within a PDF document. It supports multiple input methods for the PDF file, including binary data from a previous node, base64 encoded string, or a URL pointing to the PDF. Users can specify which pages to rotate and choose the rotation direction (clockwise, counter-clockwise, upside down, or no rotation). This is useful in scenarios where scanned documents or PDFs have pages oriented incorrectly and need adjustment without reprocessing the entire document.
Practical examples:
- Rotating scanned pages that were scanned sideways.
- Adjusting orientation of specific pages in a multi-page PDF before further processing or archiving.
- Preparing documents for printing by ensuring all pages have correct orientation.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file: "Binary Data" (from previous node), "Base64 String" (base64 encoded PDF content), or "URL" (link to PDF file). |
| Input Binary Field | Name of the binary property containing the PDF file when using "Binary Data" input type (usually "data"). |
| Base64 PDF Content | Base64 encoded string of the PDF document content, used if "Base64 String" input type is selected. |
| PDF URL | URL to the PDF file, used if "URL" input type is selected. |
| Document Name | Name for the output PDF document after rotation (default "output.pdf"). |
| Rotation Type | Type of rotation to apply to specified pages: "No Rotation", "Clockwise" (90° clockwise), "Counter Clockwise" (90° counter-clockwise), or "Upside Down" (180° rotation). |
| Page Numbers | Pages to rotate, specified as a string with single pages ("1"), comma-separated list ("1,3,5"), or ranges ("2-4"). |
| Advanced Options | Optional JSON string to set custom profiles or additional API options for advanced use cases. |
Output
The node outputs the rotated PDF document in the json output field along with binary data representing the modified PDF file. The binary data contains the actual PDF file after page rotation, ready for download, further processing, or passing to subsequent nodes.
If the input was binary, the output will include updated binary data with the rotated PDF. If the input was base64 or URL, the output similarly provides the rotated PDF content in binary form.
Dependencies
- Requires access to an external PDF processing API service capable of rotating PDF pages.
- Needs an API authentication token or key configured in n8n credentials to authorize requests to the PDF processing service.
- Internet access may be required if providing PDF via URL or if the API is cloud-based.
Troubleshooting
Common issues:
- Incorrect page numbers format can cause errors; ensure pages are specified correctly (e.g., "1", "1,3,5", or "2-4").
- Providing an invalid or inaccessible URL will result in failure to fetch the PDF.
- Missing or incorrect binary property name when using binary input will cause the node to fail to find the PDF file.
- Invalid base64 string input will cause decoding errors.
Error messages:
- "Failed to fetch PDF from URL": Check the URL accessibility and correctness.
- "Invalid page numbers format": Verify the page numbers string syntax.
- "Missing binary data": Ensure the binary property name matches the input data.
- API authentication errors: Confirm API key/token is correctly configured in n8n credentials.
Resolving these typically involves verifying input parameters, ensuring proper credential setup, and confirming network connectivity.
Links and References
- PDF4me API Documentation
- General info on PDF page rotation: https://en.wikipedia.org/wiki/PDF#Page_rotation