Tools API Blog
Sign in Create account

Convert images to PDF

Image(s) to PDF is an API that turns one or more photos (PNG or JPEG) into a single PDF, one image per page. Great for combining scans or receipt photos from n8n, Make or Zapier, with no servers to maintain.

How it works

You send one or more images (base64-encoded, inside a JSON body) and get back a PDF with each one as a page, in the same order you sent them. By default each page is exactly the size of its image; if you'd rather use a standard size (A4, Letter…), the image is centered and scaled to fit without distortion.

Since the result is one PDF with several images, this tool only accepts a JSON body (there's no "paste the raw image" mode).

All you need

  • Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
  • In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).
  • Each image converted to base64 before sending it.

The images travel inside a JSON body, so all the ones you use together can't add up to more than about 4 MB combined (photos are heavier than PDFs, so this limit bites harder here than in other tools).

How to use it in n8n (step by step)

In the HTTP Request node:

  • Method: POST
  • URL: https://api.cofferdock.com/pdf-from-images
  • Send Headers: on → add two: x-api-key = your key, and Content-Type = application/json
  • Send Body: on → Body Content Type: JSON → { "images": ["<first image base64>", "<second>"], "output": "binary" }
  • Under Options → Response → Response Format: choose File (since you asked for output: "binary")

If the image arrives as binary data from an earlier step, convert it to base64 with a Code node using {{'{{'}}$binary.data.toString('base64'){{'}}'}}, or with the Move Binary Data node.

In Make (HTTP → Make a request module): same method and URL, Body type: Raw, Content type: JSON, with the same images array.

Options (inside the JSON)

OptionDefaultWhat it does
images-Required. Array of 1 to 20 PNG or JPEG images in base64.
page_sizeautoauto (each page matches its image) or a fixed size: A4, A3, A5, Letter, Legal, Tabloid (the image is centered).
outputjsonSet to binary to receive the PDF directly instead of base64.

What you get back

By default, a JSON object with the PDF in base64. With "output": "binary" you get the PDF itself, ready to save or send.