Quickstart
1. Create a template
The easiest way to develop templates is to use our template editor.
Check out the starter template in your templates library. You’ll see that a template is just some HTML and Liquid. Change some code, and hit Render Preview to see a preview on the right-hand side. As you type, all your working changes are automatically saved.
By changing the variables in variables.json
you can preview how the template will look with different data. However, for actual production usage, you’ll pass these variables in the request body (shown below).
When you’re ready, hit Publish to deploy a new version of your template. You can now use this template to generate PDFs. 🎉
2. Generate a PDF with some variables
To create a PDF, you will simply fire a request to the /v1/pdf
API endpoint, using the slug of the template you just published.
POST
a multipart/form-data
request to the API. In response, you get back the PDF as a stream, which is saved to a file.