PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

The node provides functionality to rotate PDF documents. It supports multiple 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 the type of rotation to apply to the entire document, such as no rotation, 90 degrees clockwise, 90 degrees counter-clockwise, or 180 degrees (upside down). This node is useful in scenarios where PDFs need orientation correction or adjustment before further processing or distribution.

Practical examples:

  • Rotating scanned PDF documents that were saved in the wrong orientation.
  • Adjusting PDF reports generated by external systems to match presentation requirements.
  • Automating batch rotation of PDFs received via URLs or encoded content.

Properties

Name Meaning
Input Data Type Choose how to provide the PDF file to rotate. Options: Binary Data (from previous node), Base64 String (encoded PDF content), 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" for file uploads.
Base64 PDF Content Base64 encoded string representing the PDF document content, used when Input Data Type is Base64 String.
PDF URL URL to the PDF file to rotate, used when 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, Clockwise (90°), Counter Clockwise (90°), Upside Down (180°).
Output Binary Field Name Name of the binary property where the rotated PDF file will be stored in the output. Defaults to "data".
Advanced Options Collection of optional advanced settings, including "Custom Profiles" which allow JSON configuration for extra API options specific to certain APIs.

Output

The node outputs the rotated PDF document as binary data under the specified output binary field name (default "data"). The output contains the PDF file with the applied rotation. The output JSON structure typically includes metadata about the file and the binary data itself, enabling downstream nodes to use or save the rotated PDF.

If the input was binary, the output binary property will contain the rotated PDF file. If the input was base64 or URL, the output similarly contains the rotated PDF in binary form.

Dependencies

  • Requires access to an external PDF processing API service capable of rotating PDF documents.
  • Needs proper API authentication configured in n8n credentials (e.g., an API key or token).
  • Network access to fetch PDF files if using URL input type.
  • The node relies on bundled action modules internally to perform the rotation operation.

Troubleshooting

  • Common issues:

    • Incorrect input data type or missing binary property name may cause failures in reading the PDF file.
    • Invalid or inaccessible URL when using URL input type results in download errors.
    • Unsupported or corrupted PDF files may cause the rotation API to fail.
    • Missing or invalid API credentials will prevent successful API calls.
  • Error messages and resolutions:

    • "Input binary property not found": Verify the binary property name matches the actual input data.
    • "Failed to fetch PDF from URL": Check the URL accessibility and correctness.
    • "API authentication failed": Ensure the API key/token is correctly set up in n8n credentials.
    • "Invalid PDF format": Confirm the input PDF is valid and not corrupted.

Links and References

Discussion