Templates

Render a saved template

Changed on

Send the field values only; layout, totals, currency formatting and page numbering come from the template. Nested fields are nested objects, and list fields are arrays of objects. Up to 1 MB of data.

Templates written in your own HTML (beta) render through this same operation. They print the values they are given and do not calculate totals.

post/templates/{template_id}/render

Request

  • Base URL: https://api.podpdf.com
  • URL: https://api.podpdf.com/templates/{template_id}/render
  • Auth: API key in header X-API-Key

Request body

dataobject required
filenamestring
storeboolean
pdf_standard'pdf/ua-1' | 'pdf/ua-2'

Alpha. Make an accessible, tagged PDF that conforms to PDF/UA-1 (ISO 14289-1, PDF 1.7) or PDF/UA-2 (ISO 14289-2, PDF 2.0). For input_type html and markdown and for template renders; other inputs return 400. Leave it out for an ordinary PDF.

PodPDF adds what the file itself needs (tags, language, title, metadata, link descriptions, artifacts for page furniture) and checks the result with veraPDF. What depends on your HTML stays yours: alt text on images, headings in order, header cells in tables. The check's verdict comes back in X-PDF-Conformance (or conformance in JSON). Built-in templates pass both standards.

titlestring

Alpha. With pdf_standard: the document title, shown by PDF readers. Defaults to the page's <title>, then its first heading. Ignored without pdf_standard.

langstring

Alpha. With pdf_standard: the document language as a language tag. Defaults to the page's <html lang>, then en. Ignored without pdf_standard.

Example request

{
  "lang": "en-GB"
}

Response

The PDF, or JSON when store is true

job_idstring
pagesinteger
truncatedboolean
download_urlstring uri nullable

Signed link, valid one hour. Null when the upload failed.

download_url_expires_atstring date-time nullable
pdf_standard'pdf/ua-1' | 'pdf/ua-2'

Alpha. Make an accessible, tagged PDF that conforms to PDF/UA-1 (ISO 14289-1, PDF 1.7) or PDF/UA-2 (ISO 14289-2, PDF 2.0). For input_type html and markdown and for template renders; other inputs return 400. Leave it out for an ordinary PDF.

PodPDF adds what the file itself needs (tags, language, title, metadata, link descriptions, artifacts for page furniture) and checks the result with veraPDF. What depends on your HTML stays yours: alt text on images, headings in order, header cells in tables. The check's verdict comes back in X-PDF-Conformance (or conformance in JSON). Built-in templates pass both standards.

pdf_standard_stability'alpha'

Alpha. Present with pdf_standard.

template_idstring

Example response

{
  "job_id": "9f0a4b78-2c0c-4d14-9b8b-123456789abc",
  "pages": 3,
  "conformance": {
    "validator": "veraPDF 1.30.3",
    "failed_rules": [
      {
        "rule": "7.18.1-2",
        "specification": "ISO 14289-1:2014"
      }
    ]
  }
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status