> ## Documentation Index
> Fetch the complete documentation index at: https://docs.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generating documents from an HTML template

<div className="article_labels_list" style={{display: 'none'}} dangerouslySetInnerHTML={{__html: "End User , Box Doc Gen , Article , Product Utilization , New"}} />

Box Doc Gen can dynamically generate HTML or PDF documents from an HTML template, such as email templates or licenses.

## Generating HTML or PDF files from an HTML template

Generate HTML or PDF files in Box from an HTML template, using data from your external systems or responses collected through Box Forms.

Box Doc Gen supports two output types for an HTML template: HTML and PDF.

To generate documents from an HTML template, follow these steps:

1. Create your Box Doc Gen HTML template.
2. Add the template to Box in one of the following ways:
   * Upload the template to your preferred folder, select the ellipsis icon (…), and then select **Mark as Doc Gen template**.
   * Upload the template directly in Box Doc Gen: select **Automate** in the left sidebar, and then, on the **Doc Gen** tab, select **New** > **Doc Gen Template**.
3. Generate the document using the Box Doc Gen API, Box Relay workflows, or the Generate document UI.

<Note>
  To learn more about the tags you can use in an HTML template, see [Supported HTML features](/en/box-doc-gen/html-templates/supported-html-features).
</Note>

## Next steps

For more information on document generation, see:

* [Generating documents using the Box Doc Gen API](https://developer.box.com/guides/docgen/generate-document/)
* [Generating documents using Box Relay](/en/box-doc-gen/generating-documents-using-doc-gen/generating-documents-with-box-doc-gen-and-box-relay)
* [Generating documents using the Box web app](/en/box-doc-gen/generating-documents-using-doc-gen/generating-documents-using-box-web-app)
