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.

Every PDF you render with Blink PDF is controlled entirely through the JSON body of a POST /v1/render request. There is no CSS to write and no HTML to maintain — you describe the document you want and the API handles the rest. This page covers the core document-level options: the required markdown field, the metadata object for PDF properties, and the layout options that control page size, orientation, and margins.
The parameter names shown on this page reflect the most likely field names based on the Blink PDF API design. Confirm exact names and any additional options in the API Reference before using them in production.

The markdown Field

The markdown field is the only required field in every request. It contains the full Markdown source for your document. Blink PDF renders it into a professional PDF in approximately 100 ms.
markdown
string
required
The Markdown source of the document to render. Supports standard CommonMark syntax including headings, lists, tables, code blocks, and inline formatting. This is the only required field in the request body.

The metadata Object

The metadata object sets the document properties that are embedded inside the PDF file itself. These properties appear in PDF viewers under “Document Properties” and are indexed by search engines and document management systems. They also form the basis of Blink PDF’s PDF/UA-1 accessible output.
metadata
object
An optional object containing PDF document metadata. None of the nested fields are individually required.

Page Layout Options

The options object controls how the page itself is sized, oriented, and padded. These settings apply uniformly to every page in the rendered document.
The options object and all fields nested within it — including pageSize, orientation, and margins — are not yet publicly confirmed in the Blink PDF API reference. The names below reflect the most likely design. Always verify exact field names in the API Reference or with support before using them in production.
options
object
An optional object containing document layout settings.
Use wider left and right margins (e.g., "25mm") for documents that will be printed and bound. Most binding methods consume 10–15 mm from the inner edge.

Complete Request Example

The following example renders a two-section report with full metadata and a custom Letter-size landscape layout with generous margins.
curl -X POST https://api.blinkpdf.io/v1/render \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Q3 Financial Report\n\nThis report summarizes performance across all regions.\n\n## Revenue\n\nTotal revenue reached **$4.2M**, up 18% year-over-year.\n\n## Expenses\n\nOperating expenses remained flat at $1.9M.",
    "metadata": {
      "title": "Q3 Financial Report",
      "author": "Acme Finance Team",
      "subject": "Quarterly financial performance summary",
      "keywords": "finance, Q3, revenue, expenses, annual"
    },
    "options": {
      "pageSize": "Letter",
      "orientation": "landscape",
      "margins": {
        "top": "25mm",
        "bottom": "25mm",
        "left": "30mm",
        "right": "20mm"
      }
    }
  }'
The API returns the rendered PDF as a binary stream with Content-Type: application/pdf. Write the response body directly to a .pdf file — do not attempt to parse it as JSON.