Skip to content

Generate a one-page PDF in n8n from JSON

To generate a PDF in n8n, send your JSON fields from an HTTP Request node to PostImager with "format": "pdf". The response has a download link to a one-page PDF built from a fixed template. It does not make multi-page documents or invoices with line items, and it does not take your own HTML.

What to change from an image request

  1. Set up the HTTP Request node as for an image: POST to https://postimager.com/v1/renders?wait=60 with a Header Auth credential.
  2. In the JSON body, set "format" to "pdf".
  3. Choose a template and size, and map your fields into variables.
  4. Pass output.download.url to the next node. The link lasts 24 hours and the file is kept 7 days.

When this is the wrong tool

Use something else for multi-page reports, invoices, or a PDF from your own HTML. PostImager only renders its own built-in templates: article, product, announcement, event and quote cards.

Common questions

Can n8n create a PDF from JSON?
Yes, with an HTTP Request node that calls a PDF API. PostImager accepts JSON fields and returns a one-page PDF built from a template.
Can I use my own HTML?
No. PostImager only renders built-in templates and does not accept customer HTML.
Has this been run in n8n?
Yes. PNG and PDF renders and their downloads were run in a real self-hosted n8n against the hosted service.