# Document Template

You can manage all of your Document Templates on DocKing, including:

* Normal CRUD
* Preview HTML
* Preview PDF
  * Browser mode
  * Render PDF mode

### Console URL

```
http(s)://your-domain.com/console/#/document-templates
```

### Preview Information

Preview HTML/PDF on the editing page requires:

* Default variables (if you are using the dynamic template rendering)

### Metadata

Each template can have its own metadata. Metadata contains some information like:

* Orientation
* Page Type (A4, A3,...)
* Margin
* Default PDF Driver

To learn more about each PDF engine metadata, check out the child pages.

### Metadata Overwrite on Render

From the Template, you can define the "basic" metadata.&#x20;

While rendering a PDF, you can specify the custom metadata, which can overwrite the default metadata from the template.

In code-wise, it is simple like this:

```javascript
{
  ...template.metadata,
  ...request.metadata,
}
```

To learn more about this, check the [Endpoints](https://docking.shipsaas.tech/usage/endpoints) page.

### Driver's metadata

From the render endpoints, you can add the `driver` property to the metadata, to specify if the request needs to use the given driver (`gotenberg` or `wkhtmltopdf`)

This brings the flexibility of DocKing to a whole new level.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docking.shipsaas.tech/getting-started/document-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
