Generate PDF documents from reusable templates and JSON data. Design templates with our drag-and-drop editor or with HTML and CSS, then create pixel-perfect PDFs at any volume. Generate invoices, contracts, certificates, reports, and more.
POST your JSON data to a template and get back a download URL for the finished PDF.
# frozen_string_literal: true
require 'docspring'
client = DocSpring::Client.new
response = client.generate_pdf(
template_id: 'YOUR_TEMPLATE_ID',
test: true,
data: { first_name: 'John', last_name: 'Smith' },
metadata: { user_id: 123 }
)
puts "Download your PDF at: #{response.submission.download_url}"
Upload any PDF, such as a government form, a contract, or your own design, and place fields visually with the drag-and-drop template editor. Fillable form fields are imported automatically.
Design fully custom documents with HTML, CSS, and Liquid, using variables, loops, and conditions for dynamic invoices and reports.
Text, dates, checkboxes, images, signatures, barcodes, and QR codes. Generate anything from filled tax forms to shipping labels.
Synchronous single requests, batches of up to 50 PDFs, or asynchronous generation with webhooks. Free, unlimited test mode with watermarked PDFs.
A PDF generation API creates PDF documents programmatically from templates and data. With DocSpring, you design a template once, then send a POST request with JSON data whenever your application needs a PDF, such as invoices, contracts, certificates, or reports.
Two ways: upload an existing PDF and place fields with our drag-and-drop template editor, or build templates from scratch with HTML, CSS, and the Liquid templating language for fully custom layouts.
Text, numbers, dates, checkboxes, radio buttons, images, signatures, barcodes, and QR codes. You can generate anything from filled government forms to shipping labels.
Generate a single PDF synchronously in one request, batch-generate up to 50 PDFs per request, or use the asynchronous API with webhooks for high-volume workloads. Test mode is free and unlimited.
DocSpring is SOC 2 Type 2 certified and GDPR compliant, with US, EU, and AU data residency and BAAs available. Self-hosted enterprise licenses are available too.
Sign up for a free trial and try out DocSpring with your own PDFs.