Download PDFs

Downloading a document as a PDF requires the query parameter jwt. It must be a valid JSON Web Token (JWT) with a document_id, permissions set to ["download"], and an optional original: <boolean> property. This allows you to have fine-grained control over the generated PDF. The server will not look at the URL parameters for this endpoint:

1
GET /documents/:document_id/pdf

By default, this endpoint returns the document as a PDF with all of the annotations saved into it. If you include original: true in the JWT, the PDF that was originally uploaded for the document will be returned unmodified.

You can use this link to offer a download button for a document:

1
2
3
4
5
6
7
<a
  href="https://example.com/documents/abc/pdf?jwt=<jwt>"
  download
  target="_blank"
>
  Click here to download.
</a>