Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
The node provides functionality to rotate PDF documents. It supports rotating an entire PDF file by specified angles such as 90 degrees clockwise, 90 degrees counter-clockwise, 180 degrees (upside down), or no rotation at all. This operation is useful in scenarios where PDFs are scanned or generated with incorrect orientation and need correction before further processing or distribution.
Practical examples include:
- Automatically correcting the orientation of scanned invoices or contracts.
- Preparing PDF documents for printing by rotating pages to the desired layout.
- Adjusting PDFs received from external sources that have inconsistent page orientations.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file to rotate. Options: • Binary Data - Use PDF file from previous node • Base64 String - Provide PDF content as base64 encoded string • URL - Provide URL to PDF file |
| Input Binary Field | Name of the binary property containing the PDF file (usually "data" for file uploads). Required if Input Data Type is Binary Data. |
| Base64 PDF Content | Base64 encoded PDF document content. Required if Input Data Type is Base64 String. |
| PDF URL | URL to the PDF file to rotate. Required if Input Data Type is URL. |
| Document Name | Name of the output PDF document after rotation. Defaults to "output.pdf". |
| Rotation Type | Type of rotation to apply to the entire document. Options: • No Rotation - Keep the document as is • Clockwise - Rotate 90 degrees clockwise • Counter Clockwise - Rotate 90 degrees counter-clockwise • Upside Down - Rotate 180 degrees (upside down) |
| Output Binary Field Name | Name of the binary property to store the output PDF file. Defaults to "data". |
| Advanced Options | Custom JSON profiles to adjust extra properties for the API call. Useful for advanced users who want to specify additional parameters supported by the underlying PDF processing API. |
Output
The node outputs a binary data field containing the rotated PDF document. The binary property name can be customized via the "Output Binary Field Name" property (default is "data"). The output JSON will typically contain metadata about the processed file along with the binary data representing the rotated PDF.
If the input was a PDF file, the output is the same PDF rotated according to the selected rotation type.
Dependencies
- Requires access to an external PDF processing API service capable of rotating PDF documents.
- Needs proper API authentication configured in n8n credentials (an API key or token).
- Internet access may be required if providing the PDF via URL.
Troubleshooting
Common Issues:
- Providing an invalid or inaccessible URL when using the URL input type will cause failures.
- Incorrect base64 encoding of the PDF content may result in errors or corrupted output.
- Specifying a non-existent binary property name when using binary data input will cause the node to fail.
- Insufficient permissions or missing API credentials will prevent successful API calls.
Error Messages:
- Errors related to "file not found" or "unable to fetch URL" indicate issues with the provided PDF URL.
- "Invalid PDF format" or similar messages suggest the input PDF content is corrupted or improperly formatted.
- Authentication errors indicate missing or invalid API credentials; ensure credentials are correctly set up in n8n.
Resolutions:
- Verify URLs are accessible and correct.
- Confirm base64 strings are properly encoded.
- Double-check binary property names match those from previous nodes.
- Ensure API credentials are valid and have necessary permissions.
Links and References
- PDF4me API Documentation — For details on custom profiles and advanced options.
- General information on PDF rotation and manipulation can be found in many PDF library documentations and online resources.