ReflowPDF API
Print HTML and templates to PDF with the engine of the ReflowPDF editor: paged media, running headers, footnotes, tables across pages, tagged PDF.
curl https://api.reflowpdf.com/v1/pdf \
-H "Authorization: Bearer $REFLOWPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello, PDF</h1><p>Printed by ReflowPDF.</p>"}' \
-o hello.pdfimport { ReflowPDF } from '@reflowpdf/sdk'
import { writeFile } from 'node:fs/promises'
const reflow = new ReflowPDF() // reads REFLOWPDF_API_KEY
const pdf = await reflow.pdf.create({
html: '<h1>Hello, PDF</h1><p>Printed by ReflowPDF.</p>',
})
await writeFile('hello.pdf', pdf.bytes)
console.log(pdf.pages, 'page(s)')from reflowpdf import ReflowPDF
client = ReflowPDF() # reads REFLOWPDF_API_KEY
pdf = client.pdf.create(html="<h1>Hello, PDF</h1><p>Printed by ReflowPDF.</p>")
with open("hello.pdf", "wb") as f:
f.write(pdf.content)
print(pdf.pages, "page(s)")What you can do#
The essentials#
| Base URL | https://api.reflowpdf.com/v1 |
| Authentication | Authorization: Bearer rpdf_… with your API key |
| Requests | JSON bodies, up to 15 MB |
| Responses | the PDF file, or its link with Accept: application/json; images of pages; element positions |
| Options | every capability of the engine: standards, headers and footers, watermarks, encryption, attachments, compression |
| Errors | RFC 9457 problem details with a stable code and a request_id |
| Description | OpenAPI 3.1, for Postman, Insomnia or a code generator |