PDF to PNG Conversion with Multi-Page Support (PDF.co) - n8n Workflow

An expert n8n workflow template to convert multi-page PDF files into individual PNG images using the PDF.co service. Learn how to handle binary data and API calls in n8n.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Users needing robust PDF processing capabilities within their automation.

  • Developers or technical users integrating PDF.co API calls into an n8n workflow.

  • Businesses required to extract images or proof sheets from multi-page documents automatically.

  • Anyone looking for advanced examples of binary file handling and looping structures in n8n templates.

Overview

Handling binary file conversion, especially for multi-page documents, requires precise steps, including secure uploading, file splitting, and iterative conversion. This comprehensive n8n workflow provides a robust solution by leveraging the powerful PDF.co service. It demonstrates best practices for managing binary data within n8n nodes, ensuring files are uploaded securely via a presigned URL, split into pages, and then converted individually to PNG format. By using this n8n automation, users can reliably transform lengthy PDFs into high-quality image assets ready for further use, such as archival or presentation. This specific n8n template is essential for those whose automation tasks involve high-volume document conversion.

How it Works

This n8n workflow is initiated manually (though it can easily be adapted to an n8n trigger like a webhook or file upload).


  1. Input Simulation/Trigger: The workflow starts with the When clicking ‘Test workflow’ n8n trigger, which fetches and downloads two example PDF files for demonstration purposes.

  2. Prepare Upload: The downloaded PDF binary data is prepared. An initial HTTP Request to PDF.co fetches a Presigned Upload URL.

  3. Secure Upload: The binary file is merged with the presigned URL details and uploaded to PDF.co via another HTTP Request n8n node, maximizing security and efficiency.

  4. Cleanup: The large binary data is stripped after the successful upload, ensuring the subsequent steps in the n8n template remain efficient.

  5. Split PDF (Multi-Page Support): The Split multipage PDF files PDF.co API call is executed. This returns a list of URLs, one for each page of the original PDF.

  6. Iteration: The Loop over pdf files n8n node uses a Split In Batches approach to process each page URL individually.

  7. Conversion: Inside the loop, the Convert PDF to PNG (PDF.co) n8n node converts the specified page URL to a PNG.

  8. Download: The resulting PNG file is downloaded as binary data using the Download PNG from PDF.co n8n node.

  9. Aggregation: All resulting PNG binary files are collected and output by the Combine binaries n8n node, completing this powerful n8n workflow.

Installation Guide

To utilize this expert n8n template, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON and paste it directly into your n8n instance using the 'Import Workflow' option.

  2. PDF.co Credentials: You will need a PDF.co API key. Create a new credential in n8n for the HTTP Request n8n nodes (Get Presigned Upload URL, Upload PDF to Presigned URL, Split multipage PDF files, Convert PDF to PNG (PDF.co)).

  3. Configure API Key: For each relevant HTTP Request n8n node, select 'Authentication' as 'Header Auth', and set the header 'x-api-key' to your PDF.co API key. This is a crucial step for the n8n workflow to function.

  4. Test: Click 'Test workflow' on the manual n8n trigger to run the example file simulation and see the multi-page conversion results.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): The initial n8n trigger. Used here to manually start the demonstration and simulate file input.
Download example PDF Files (HTTP Request n8n node): Downloads external PDF files which serve as the input binary data for the rest of the n8n workflow.
Get Presigned Upload URL (PDF.co) (HTTP Request n8n node): Obtains a temporary, secure URL from PDF.co where the input file should be uploaded. Key configuration involves setting the PDF.co API key as an authentication header.
Combine binary and json data (Merge n8n node): Merges the downloaded PDF binary data with the JSON response containing the presigned upload URL, preparing the request body for the actual upload.
Upload PDF to Presigned URL (HTTP Request n8n node): Executes the file upload using the PUT method to the presigned URL. This is critical for moving the binary file into the PDF.co environment.
Split multipage PDF files (HTTP Request n8n node): Invokes the PDF.co API endpoint specifically designed to handle multi-page PDFs, providing separate URLs for conversion. This ensures the n8n workflow can process documents page by page.
Loop over pdf files (Split In Batches n8n node): Controls the flow, ensuring every single page URL resulting from the split is processed sequentially or in batches.
Convert PDF to PNG (PDF.co) (HTTP Request n8n node): The core conversion step. Takes the URL of a single PDF page and requests its conversion to PNG format.
Download PNG from PDF.co (HTTP Request n8n node): Fetches the newly converted PNG binary data from the temporary PDF.co output URL.
Combine binaries (Aggregate n8n node): Collects all resulting binary PNG files downloaded within the loop into a single output item, concluding the n8n automation.

Related n8n Workflows

Paid

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by

If you have any questions about any of the templates I've built, please reach out to me on LinkedIn (https://www.linkedin.com/in/ludwiggerdes) or via my website down below. 👇