Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.blinkpdf.io/llms.txt

Use this file to discover all available pages before exploring further.

Blink PDF gives you direct control over the typography and layout of every document you render. You can select any font from the hosted font library, and Blink PDF automatically subsets the font — embedding only the characters your document actually uses — to keep file sizes small. Layout options let you arrange content in multiple columns and fine-tune spacing between elements, all through the same JSON body you already use for every render request.
The parameter names shown on this page reflect the most likely field names based on the Blink PDF API design. Confirm exact names and available values in the API Reference before using them in production.

Listing Available Fonts

Before you set a font, you can fetch the complete list of fonts available on the Blink PDF platform by calling the GET /v1/fonts endpoint. The response is an array of font name strings that you can pass directly to options.font.
curl https://api.blinkpdf.io/v1/fonts \
  -H "Authorization: Bearer sk_live_..."
The font names shown in the comments above (e.g., Inter, Roboto, Merriweather) are illustrative examples. The actual fonts available on your plan are returned by a live call to GET /v1/fonts. Always use names from that response — not the examples here — when setting options.font.
Run the GET /v1/fonts call once at application startup and cache the result. The available font list changes infrequently — there is no need to fetch it on every render.

Font Parameters

options.font
string
default:"Inter"
The font family to use for the entire document body. The value must exactly match a name returned by GET /v1/fonts. Headings, body text, and captions all inherit this font unless the Markdown itself encodes a different style (e.g., code blocks always render in a monospace face).Example: "Merriweather", "Roboto", "Source Serif 4"
options.fontSize
string
default:"11pt"
The base font size for body text. All heading sizes scale proportionally from this value. Accepts standard CSS length units: "11pt", "14px", "1rem".
options.lineHeight
number
The line height multiplier applied to body text. A value of 1.5 means lines are spaced at 1.5× the font size. Increase to 1.8 for documents that will be annotated on screen or in print.

Font Subsetting

Font subsetting is automatic and always enabled. When Blink PDF renders your document, it inspects every character in your Markdown source and embeds only the glyphs that are actually used into the output PDF. A document that uses only Latin characters and a handful of punctuation marks will embed a fraction of the full font file. This means you get:
  • Smaller PDF files — typically 60–80% smaller than embedding a complete font.
  • Reliable rendering — the characters your document needs are always present, regardless of what fonts the recipient has installed.
  • PDF/UA-1 compliance — embedded font data satisfies accessibility requirements for tagged PDF output.
You do not need to configure anything to enable subsetting — it happens on every render automatically.

Layout Parameters

options.columns
integer
default:1
The number of columns to flow body text into. Set to 2 for newsletter-style layouts or academic papers that follow a two-column format. Headings that appear at the top level (#) span the full page width regardless of column count.Accepted values: 1, 2, 3.
options.columnGap
string
default:"10mm"
The gap between columns when options.columns is greater than 1. Accepts CSS-style length units: "10mm", "0.5in".
options.paragraphSpacing
string
default:"6pt"
Extra vertical space added below each paragraph. Increase this value to give your document a more open, airy feel. Accepts CSS-style length units.

Complete Example: Serif Font, Two Columns

The following request renders a newsletter-style document using a serif font, a two-column layout, and a slightly open line height.
curl -X POST https://api.blinkpdf.io/v1/render \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# The Monthly Digest\n\n## Product Updates\n\nThis month we shipped three major features: real-time collaboration, an improved search index, and a redesigned dashboard that loads 40% faster.\n\n## Engineering Notes\n\nOur infrastructure team migrated the primary database cluster to a new region with zero downtime, reducing average query latency by 12ms.\n\n## Upcoming Events\n\nJoin us for an online Q&A on the 15th at 2 PM UTC. Register via the link in your welcome email.",
    "metadata": {
      "title": "The Monthly Digest — June 2025",
      "author": "Acme Communications"
    },
    "options": {
      "font": "Merriweather",
      "fontSize": "10.5pt",
      "lineHeight": 1.7,
      "columns": 2,
      "columnGap": "12mm",
      "paragraphSpacing": "8pt",
      "pageSize": "A4",
      "margins": {
        "top": "22mm",
        "bottom": "22mm",
        "left": "18mm",
        "right": "18mm"
      }
    }
  }'
Three-column layouts work best with smaller font sizes (9–10pt) and narrower column gaps. On A4 at standard margins, each column in a three-column layout is approximately 55mm wide — enough for comfortable reading at 9pt but tight at 12pt.