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

This node provides functionality to rotate PDF documents. It supports rotating an entire PDF file by 0°, 90° clockwise, 90° counter-clockwise, or 180° (upside down). The node is useful in scenarios where PDFs are scanned or generated with incorrect orientation and need correction before further processing or distribution.

Practical examples include:

  • Rotating scanned documents that were scanned sideways.
  • Adjusting the orientation of PDFs received from external sources.
  • Preparing PDFs for printing or presentation with the correct page rotation.

The node accepts input PDF files in multiple formats: binary data from a previous node, base64 encoded string, or a URL pointing to the PDF file.

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)
Advanced Options Collection of advanced settings. Currently supports:
• Custom Profiles — JSON string to adjust custom properties for API calls, allowing extra options specific to certain APIs. See https://dev.pdf4me.com/apiv2/documentation/ for details.

Output

The node outputs the rotated PDF document in binary form attached to the output item. The output includes:

  • A JSON object representing metadata or status (depending on the underlying API response).
  • The rotated PDF file as binary data, typically accessible via a binary property (commonly named "data").

If the input was a PDF file, the output will be the same PDF rotated according to the selected rotation type.

Dependencies

  • Requires access to the PDF4me API service to perform the rotation operation.
  • Needs an API key credential configured in n8n to authenticate requests to the PDF4me API.
  • Internet connectivity is required if using URL input or calling the external API.

Troubleshooting

  • Common issues:

    • Providing an invalid or inaccessible URL when using URL input type may cause failures.
    • Incorrect base64 encoding or corrupted binary data can lead to errors during processing.
    • Missing or misnamed binary property when using binary input type will result in no file found.
    • Invalid JSON in Custom Profiles advanced option may cause API call errors.
  • Error messages and resolutions:

    • "File not found" — Check that the binary property name matches the actual input binary field.
    • "Invalid PDF format" — Verify that the input PDF is not corrupted and is properly encoded.
    • "Authentication failed" — Ensure the API key credential is correctly set up and valid.
    • "Failed to fetch URL" — Confirm the URL is reachable and publicly accessible.

Links and References

Discussion