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
This node operation "Rotate PDF Page" allows users to rotate specific pages within a PDF document. It supports various input methods for the PDF file, including binary data from a previous node, a base64 encoded string, or a URL pointing to the PDF file. Users can specify which pages to rotate and select the rotation type (e.g., 90 degrees clockwise, counter-clockwise, upside down, or no rotation). The output is a new PDF document with the specified pages rotated accordingly.
This node is beneficial in scenarios where PDFs need page orientation adjustments without altering the entire document. For example:
- Correcting scanned documents where some pages are sideways.
- Rotating pages before merging or printing.
- Preparing PDFs for presentations or reviews requiring consistent page orientation.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Method to provide the PDF file: - Binary Data: Use PDF from previous node's binary property. - Base64 String: Provide PDF content as a base64 encoded string. - URL: Provide a direct URL to the 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 Input Data Type is Base64 String). |
| PDF URL | URL to the PDF file (used if Input Data Type is URL). |
| Document Name | Desired name for the output PDF document (default: "output.pdf"). |
| Rotation Type | Type of rotation to apply to the specified pages: - No Rotation: Keep pages as is. - Clockwise: Rotate 90 degrees clockwise. - Counter Clockwise: Rotate 90 degrees counter-clockwise. - Upside Down: Rotate 180 degrees. |
| Page Numbers | Pages to rotate, specified as a string (e.g., "1", "1,3,5", or "2-4"). |
| Output Binary Field Name | Name of the binary property where the output PDF file will be stored (default: "data"). |
| Advanced Options | Optional JSON string to set custom profiles or extra API options for advanced use cases. |
Output
The node outputs a binary property containing the rotated PDF document. The binary data represents the updated PDF file with the specified pages rotated according to the selected rotation type. The output also includes a JSON object with metadata about the operation result.
json: Contains metadata or status information related to the rotation operation.binary: Contains the actual PDF file data under the specified output binary field name (default "data").
Dependencies
- Requires access to an external PDF processing API service that performs the rotation operation.
- Needs proper API authentication configured in n8n credentials (an API key or token).
- Internet access may be required if the PDF is provided via URL or if the API is cloud-based.
Troubleshooting
Common Issues:
- Invalid page numbers format or specifying pages outside the document range may cause errors.
- Providing incorrect input data type or missing required fields (e.g., binary property name or base64 content) will prevent execution.
- Network issues or invalid URLs when using URL input type can lead to failures fetching the PDF.
- API authentication errors if credentials are not properly set up.
Error Messages:
- "Invalid page numbers": Check the page number string format and ensure pages exist in the PDF.
- "Missing input PDF data": Verify that the input data is correctly provided based on the selected input type.
- "Failed to fetch PDF from URL": Confirm the URL is accessible and points to a valid PDF.
- "Authentication failed": Ensure API credentials are correctly configured in n8n.
Links and References
- PDF4me API Documentation — For details on custom profiles and advanced options.
- n8n Documentation — General guidance on using nodes and handling binary data.