HTML to PDF playground

Write a template in HTML and CSS, fill it with JSON data and see the PDF, image or Excel file Typefold makes. This is how Typefold works in your app: the template lives in your account, and your app sends only the data. No account needed to try it.

or Ctrl+Enter
The example's first page, as Typefold renders it. Edit it and press Render.
First page of the invoice example as a PDF

Render it from your app

In your account, what you wrote above becomes a template. Your app sends only the data and gets the PDF back.

  1. Create a free account, then a code template named Invoice. Paste the HTML, CSS, header and footer into it and publish it.
  2. Create an API key under Developers → API keys.
  3. Send the data. This request has the data from the Data tab and returns the file:

The quickstart walks through each step, and templates and data lists the helpers, such as format for amounts and dates.

What the playground shows

  • Headers and footers. HTML in the Header and Footer tabs is drawn in the page margins, on every page.
  • Page numbers. Elements with the class pageNumber or totalPages in a header or footer show the page number and the page count.
  • Page breaks. break-before: page starts a new page, and break-inside: avoid keeps a block or table row together.
  • Long tables. A table's <thead> repeats at the top of every page it runs over.
  • PDF, image or Excel. Output PNG image draws the first page as a picture. The Excel workbook example is a spreadsheet template: sheets.json lists the columns, and the same data comes out as an XLSX file and as a PDF of its tables.
  • Paper and margins. An @page rule sets the margins and the orientation.
  • JavaScript in the page does not run. Data goes in with Handlebars, as in the examples: {{name}}, {{#each lines}}, {{#if note}}.
  • Images and fonts at web addresses are not loaded. Here, put images in as data: URLs; in your account you upload them.
  • Each PDF has a "Typefold playground" watermark, and each visitor can render 30 documents a day.
  • What you paste is rendered and not kept. In the playground, templates have no helpers or scripts of your own.

Read the supported CSS and what's not supported for the details.

Make it your template

Create a free account