> For the complete documentation index, see [llms.txt](https://help.form.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.form.io/reference/environment-variables/pdf-server-variables.md).

# PDF Server Variables

### Server & Networking <a href="#core-server-and-networking" id="core-server-and-networking"></a>

| Variable                                | Default | Notes                                                                               |
| --------------------------------------- | ------- | ----------------------------------------------------------------------------------- |
| `FORMIO_PDF_PORT`                       | `4005`  |                                                                                     |
| `ENABLE_SSL`, `SSL_KEY`, `SSL_CERT`     | `false` | Key/cert accept a file path or a literal value                                      |
| `MAX_BODY_SIZE`                         | `16mb`  |                                                                                     |
| `VERBOSE_HEALTH`                        | `false` | Richer `/health` output (`src/server.js`)                                           |
| `FORMIO_DEBUG`                          | `false` |                                                                                     |
| `DEBUG`                                 | unset   | Standard `debug`-library namespaces; also enables extra logging in `generatePDF.js` |
| `PROXY`                                 | `''`    | If set and `HTTP_PROXY` is not, it is copied into `HTTP_PROXY` at boot              |
| `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` | unset   | Passed to Chromium as `--proxy-server` / `--proxy-bypass-list` (`createBrowser.js`) |
| `STRICT_SSL`                            | `false` | TLS verification for outbound file fetches (`src/middleware/core/file/fetch.js`)    |

### Enterprise Server Integration <a href="#form.io-integration" id="form.io-integration"></a>

| Variable                         | Default                                                 | Notes                                                                                                                                                                                                                         |
| -------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FORMIO_SERVER`                  | `https://api.form.io`                                   | The API server pdf-server talks to; when unset, the request's `x-host` header is preferred                                                                                                                                    |
| `FORMIO_SERVER_LOCAL_PUBLIC_URL` | unset                                                   | Local-docker development only: the host-reachable API URL (e.g. `http://localhost:3000`) used for HTML-format submission downloads while `FORMIO_SERVER` points at the docker alias (e.g. `http://host.docker.internal:3000`) |
| `FORMIO_PDF_PROJECT`             | `null`                                                  |                                                                                                                                                                                                                               |
| `FORMIO_PDF_APIKEY`              | `''`                                                    |                                                                                                                                                                                                                               |
| `FORMIO_PDF_ADMINKEY`            | `''`                                                    | `x-admin-key` authorization (`src/middleware/core/authorize/adminKey.js`)                                                                                                                                                     |
| `FORMIO_LIBURL`                  | `''`                                                    | Override URL for the inlined viewer/renderer assets                                                                                                                                                                           |
| `FORMIO_VIEWER`                  | `http(s)://localhost:{port}/view/index.html?branding=0` | The viewer page Chromium loads to render forms; protocol follows `ENABLE_SSL`                                                                                                                                                 |

### License & Project Settings <a href="#license-and-project-settings" id="license-and-project-settings"></a>

| Variable                                     | Default                   | Notes                                                                                                                                                             |
| -------------------------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LICENSE_KEY`                                | unset                     |                                                                                                                                                                   |
| `LICENSE_SERVER`                             | `https://license.form.io` | Also read directly in `src/utilization.js`                                                                                                                        |
| `LICENSE_REMOTE`                             | `false`                   |                                                                                                                                                                   |
| `DB_SECRET`                                  | **no default**            | Direct `process.env` read — decrypts `settings_encrypted` on projects to extract the license key (`storage/Mongo.js`). Must match the formio-server's `DB_SECRET` |
| `CACHE_TIME`                                 | `900`                     | Seconds (15 min) — project info cache (`src/middleware/info/load.js`)                                                                                             |
| `FORMIO_HOSTED_FORMS` / `FORMIO_HOSTED_SUBS` | `25` / `1000`             | Form/submission allowances for `hosted` and `commercial` plans (`src/middleware/info/allowance.js`)                                                               |

### Chromium & Rendering <a href="#chromium-and-rendering" id="chromium-and-rendering"></a>

| Variable                     | Default                 | Notes                                                                                                |
| ---------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------- |
| `CHROME_BIN`                 | unset                   | When set, uses `puppeteer-core` with this executable instead of bundled puppeteer Chromium           |
| `FORMIO_FONT_RENDER_HINTING` | `none`                  | Whitelisted values: `none`, `slight`, `medium`, `full`, `max` — passed as a Chromium launch argument |
| `SHOW_CHECKBOX_BACKGROUND`   | `false`                 | `generatePDFOptions.js`                                                                              |
| `PDF_BROWSER_TIMEOUT`        | `120000`                | ms                                                                                                   |
| `PROTOCOL_TIMEOUT`           | `180000`                | ms — puppeteer protocol timeout                                                                      |
| `PDF_PRINTING_TIMEOUT`       | `30000`                 | ms                                                                                                   |
| `FORMIO_PDF_RENDER_BUFFER`   | `100`                   | `submission/index.js`                                                                                |
| `PDFLIBS_URL`                | `http://localhost:8080` | The pdf-libs sidecar service (conversion, form-field extraction)                                     |
| `PDFUNITE_PATH`              | `/usr/bin/pdfunite`     | Binary used to merge PDFs (`unite.js`)                                                               |
| `FILE_CACHE_TIME`            | `3600000`               | ms (1 h) — `fileCache.js`                                                                            |

### MongoDB <a href="#mongodb" id="mongodb"></a>

| Variable                                                 | Default                                     | Notes                                                                                                                                                                                      |
| -------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `MONGO`                                                  | `mongodb://localhost:27017/{MONGO_DB_NAME}` | `mongodb://mongo:27017/...` when running in Docker; if `MONGO_DB_NAME` is unset the db name is parsed back out of this URL                                                                 |
| `MONGO_DB_NAME`                                          | `formio`                                    |                                                                                                                                                                                            |
| `MONGO_SA` / `MONGO_CA`                                  | unset                                       | CA certificate. **Gotcha:** when set, a `tlsCAFile` already in the connection string is silently stripped — configure TLS from one place only (`pdf-server/mongo-ca-stripped-from-url-04`) |
| `MONGO_CONFIG`                                           | unset                                       | JSON driver options                                                                                                                                                                        |
| `MONGO_PORT_27017_TCP_ADDR`, `MONGO_PORT_27017_TCP_PORT` | unset (`mongo` / `27017`)                   | LEGACY Docker v1 container-linking convention                                                                                                                                              |

### File Storage <a href="#file-storage" id="file-storage"></a>

| Variable                                                   | Default | Notes |
| ---------------------------------------------------------- | ------- | ----- |
| `FORMIO_S3_SERVER`                                         | `''`    |       |
| `FORMIO_S3_PORT`                                           | `8333`  |       |
| `FORMIO_S3_PREFIX`                                         | `''`    |       |
| `FORMIO_S3_BUCKET`                                         | `''`    |       |
| `FORMIO_S3_SECURE`                                         | `false` |       |
| `FORMIO_S3_KEY`, `FORMIO_S3_SECRET`, `FORMIO_S3_REGION`    | unset   |       |
| `FORMIO_AZURE_CONNECTION_STRING`, `FORMIO_AZURE_CONTAINER` | `''`    |       |

### AWS Textract (PDF form-field recognition) <a href="#aws-textract-pdf-form-field-recognition" id="aws-textract-pdf-form-field-recognition"></a>

Textract is used only when **all** required keys below are set and `DISABLE_TEXTRACT` is not `true`. The key/secret pair is optional (IAM role auth); everything else is required.

| Variable                           | Default                                  | Notes                                               |
| ---------------------------------- | ---------------------------------------- | --------------------------------------------------- |
| `TEXTRACT_BUCKET`                  | `{FORMIO_S3_BUCKET}`                     | Input bucket                                        |
| `TEXTRACT_KEY` / `TEXTRACT_SECRET` | `{FORMIO_S3_KEY}` / `{FORMIO_S3_SECRET}` | Optional — falls back to S3 credentials             |
| `TEXTRACT_REGION`                  | `{FORMIO_S3_REGION}`                     |                                                     |
| `TEXTRACT_ROLE_ARN`                | unset                                    | Required for Textract to activate                   |
| `TEXTRACT_SNS_TOPIC_ARN`           | unset                                    | Required for Textract to activate                   |
| `TEXTRACT_OUTPUT_S3_BUCKET`        | `{FORMIO_S3_BUCKET}`                     |                                                     |
| `TEXTRACT_OUTPUT_FOLDER`           | `textract-output`                        |                                                     |
| `TEXTRACT_MAX_SYNC_COUNT`          | `90`                                     |                                                     |
| `DISABLE_TEXTRACT`                 | `false`                                  | `true` disables Textract even when fully configured |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.form.io/reference/environment-variables/pdf-server-variables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
