Menu
Sign up

PDF generation API for one-page documents

Certificates, tickets, badges, labels and one-page invoices as vector PDFs from an HTML template — one request each, or a whole CSV at once.

Published November 4, 2026 · 5 min read

The Shareglint API turns an HTML and CSS template into a one-page vector PDF: a certificate, an event ticket, a badge, a shipping label, a one-page invoice or a coupon. You save the design once, then each PDF is one HTTP request with the fields that change — or one batch request for a whole spreadsheet. It is deliberately narrow: every template PDF is exactly one page, the size of the template, with no page breaks, headers or footers. If you need a 12-page report, this is the wrong tool, and this page says what to use instead.

What you get

  • One page, the template's size. The page is the template's width and height in CSS pixels at 96 px per inch, with no margins and backgrounds printed. A 1123×794 template is A4 landscape; 794×1123 is A4 portrait; 816×1056 is US Letter. Templates can be up to 4,000 px on a side.
  • Vector text. Chrome prints your HTML, so text is sharp at any zoom, selectable and searchable. Photos and logos stay images at their own resolution.
  • The same template for PNG. Ask for "format": "png" and the same design comes back as an image for email or social posts; pdf gives the printable version. Each format is its own file and its own render.
  • One quota. A PDF uses one render, like an image. The same values in the same format again cost nothing: the existing file comes back.

Formats on every account: PNG, JPEG, WebP, PDF, GIF, MP4. The Free plan's watermark is in PDFs too; paid plans from $9 a month have none.

One PDF per request

Save a template once — your own HTML and CSS with {{ field }} placeholders, a copy of a built-in template, or one made in the visual editor — then render it:

curl -X POST "https://shareglint.com/v1/images?wait=true" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "template": "certificate",
    "format": "pdf",
    "modifications": {
      "name": "Amelia Novak",
      "course": "API Design Masterclass",
      "date": "November 4, 2026",
      "issuer": "Daniel Okafor"
    }
  }'

With ?wait=true the answer holds the finished file's url (ending in .pdf, served as application/pdf); without it you get an id to poll, or a webhook when it is done. The built-in certificate, event-ticket and event-badge templates render in every size preset, but for print you will usually want your own template at a paper size.

A template for A4 landscape starts like this — the page box is the template's size, so the CSS only lays out what goes on it:

<div class="page">
  <p class="kicker">Certificate of completion</p>
  <h1 data-autofit>{{ name }}</h1>
  <p>has completed <strong>{{ course }}</strong> on {{ date }}.</p>
  <p class="sign">{{ issuer }}</p>
</div>
.page { width: 1123px; height: 794px; padding: 72px; box-sizing: border-box;
        font-family: Roboto, sans-serif; background: #fffaf2; color: #1f2937; }
h1 { font-size: 64px; }

Save it with POST /v1/templates with width: 1123 and height: 794. data-autofit shrinks a long name to fit its box instead of wrapping onto the signature. Fonts come from the families installed on our renderer (GET /v1/fonts); you cannot upload your own font file.

A whole spreadsheet at once

For a class of 300 or a conference of 2,000, send one batch instead of 300 requests:

curl -X POST "https://shareglint.com/v1/batches" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "template": "certificate",
    "format": "pdf",
    "csv_url": "https://docs.google.com/spreadsheets/d/…/edit?usp=sharing"
  }'

Columns map to fields by name (case and spaces ignored, or explicitly with columns); a filename column names each file in the ZIP and an id column comes back with each row's result. Rows render in the background; GET /v1/batches/{id} shows progress and, at the end, every PDF's URL and one ZIP. Rows per batch by plan: Free 50, Starter 500, Pro 1,000, Scale 2,000, Business 5,000. Each row is one render, and rows already rendered with the same values are free. The dashboard's Bulk page does the same from an uploaded CSV, with a free preview of the first rows. The bulk guide covers CSV formats and mapping.

A signed URL renders the PDF the first time someone opens it: https://shareglint.com/i/{account}/{template}.pdf?name=…&s=…, where s is an HMAC made with your signing secret. The extension is part of the signature, so a link signed for .png does not open the PDF. That suits "download your ticket" links in an email: no file is made until a recipient clicks, and the second click is served from the cache.

What it does not do

Being exact about the limits saves you a migration later:

  • No multi-page documents from templates. No page breaks, running headers, page numbers or tables that flow onto a second page. Content that does not fit the template's height is cut off, not moved to a second page.
  • Screenshot PDFs are slices, not documents. POST /v1/screenshots with "format": "pdf" and full_page prints a public web page as several viewport-sized pages. That is fine for archiving how a page looked; it is not a paginated document.
  • No forms, signatures, PDF/A or merging. The output is a printed page, not a fillable form, and we do not combine files.
  • No custom fonts. Installed families only.

For long documents, use a service built for pagination — DocRaptor, PDFShift or APITemplate.io's PDF plans handle page breaks and headers — or do it yourself with Puppeteer's page.pdf() and its format, margin and displayHeaderFooter options plus CSS @page rules — the Puppeteer PDF guide covers page breaks, repeated table headers and page-number footers. Puppeteer drives the same Chrome print engine we use; it simply lets the document run over as many pages as it needs.

When this is the right tool

One-page documents made in volume from data are where a template API shines: every certificate, ticket or label has the same layout and different fields, the design lives in HTML you can version, and each file costs one render. Typical setups:

  • Course certificates issued when a learner finishes, emailed as a PDF link — see certificates.
  • Event tickets and badges printed from the registration export, with each attendee's QR code (an image you generate) in an image field.
  • Shipping and product labels at a label size, from the order system.
  • One-page invoices and receipts where the line items fit on a page.

The same design as PNG covers the email preview or the social post that announces it. Plans and per-1,000 prices are on the pricing page; the API docs describe every field, and the HTML to image API page has a free playground for trying a layout before you save it.

FAQ

Can the API make multi-page PDFs?

Not from a template: a template PDF is always exactly one page, the size of the template. A screenshot of a web page in PDF format with full_page can span several viewport-sized pages, but those are slices of the screen, not a document with page breaks, headers or footers. For reports and long invoices use a dedicated HTML-to-PDF service or Puppeteer's page.pdf.

Is the text in the PDF vector or an image?

Vector. The PDF is printed by Chrome from your HTML and CSS with backgrounds included, so text stays sharp at any zoom and can be selected and searched. Photos inside the design stay raster images at their own resolution.

What page size does the PDF have?

Exactly the template size in CSS pixels, at 96 pixels per inch, with no margins. A 1123×794 template is A4 landscape within a fraction of a millimetre; a 1200×630 built-in template gives a 900×472.5 pt page.

How much does one PDF cost?

One render of the monthly quota, the same as a PNG. Rendering the same values again in the same format returns the existing file for free. The Free plan adds its watermark to PDFs too.

Can I make hundreds of PDFs from a spreadsheet?

Yes. POST /v1/batches takes a template, a CSV or Google Sheets link (or a JSON array of rows) and format pdf, renders every row, and returns each file's URL plus one ZIP of all of them.