1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

files → Split a PDF

AI-generated

Overview

The Split a PDF operation in the "files" resource of this n8n node allows you to split a PDF file into individual pages. Each page can be output either as a separate PDF or as an image (JPEG), depending on your selection. This is useful for workflows where you need to process, store, or distribute specific pages from a larger PDF document.

Common scenarios:

  • Extracting specific pages from a contract or report for review.
  • Converting each page of a scanned document into images for OCR or archival.
  • Automating document management tasks that require splitting PDFs before further processing.

Practical example:
You receive multi-page invoices as PDFs and want to save each page as a separate JPEG image for use in another system.


Properties

Name Meaning
PDF file PDF file to be splitted. (Input as binary data; select the property containing the PDF file)
Output Format The output format for each page. Options: pdf, jpeg. Defaults to pdf.
Binary Property Name of the binary property to which to write the data of the read file.

Output

  • Binary Data:
    For each input item, the node outputs a new binary property (named as specified in "Binary Property") containing the result:

    • If "Output Format" is pdf: Each page is output as a separate PDF file.
    • If "Output Format" is jpeg: Each page is output as a separate JPEG image.
  • JSON Field:
    The original JSON data is preserved. If an error occurs and "Continue On Fail" is enabled, an error field will be added to the JSON with details about the failure.


Dependencies

  • External Service:
    Requires access to the 1001fx API.
  • API Key:
    You must configure the 1001fxApi credential in n8n.
  • n8n Configuration:
    The input PDF must be provided as binary data under the property name specified in "PDF file".

Troubleshooting

Common Issues:

  • Missing or Incorrect Binary Property:
    If the specified binary property does not contain a valid PDF, the node will fail.
  • Invalid Output Format:
    Only pdf and jpeg are supported. Any other value will cause an error.
  • API Errors:
    If the 1001fx API returns an error (e.g., invalid credentials, unsupported file type), the node will throw an error message.

Error Messages:

  • "Cannot read property 'fileName' of undefined": Likely due to an incorrect binary property name.
  • "Request failed with status code 4xx/5xx": Indicates an issue with the API request (authentication, file size, etc.).
  • If "Continue On Fail" is enabled, errors will appear in the output JSON under the error key.

Links and References

Discussion