# Generate PDF - Workflow node | Docs - nodulz

Source: https://nodulz.com/docs/nodes/generate_pdf

Language: en

Build a PDF from HTML and CSS (Monaco editor) or plain text

## Usage and specifics

HTML mode uses HTML/CSS; text mode uses title and content. Choose page size, margins and filename. HTML generation depends on the backend PDF engine.

Technical type : `generate_pdf`. Runtime : `nodulz`.

## Credentials and prerequisites

This node defines no dedicated external credential. Remote sources or execution targets may still need their own access credentials.

See the [credentials guide](/docs/credentials) if a remote source or execution target requires access.

## Parameters

Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.

| Parameter | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `contentMode` | `enum` | `"html"` | `html`, `plain` |
| `html` | `string` | `""` | - |
| `css` | `string` | `""` | - |
| `title` | `string` | `""` | - |
| `content` | `string` | `""` | - |
| `fileName` | `string` | `"document.pdf"` | - |
| `pageSize` | `enum` | `"A4"` | `A4`, `LETTER` |
| `fontSize` | `number` | `12` | -; ≥ 8, ≤ 32 |
| `margin` | `number` | `50` | -; ≥ 24, ≤ 96 |

## Configuration help

| Setting | Purpose and guidance |
| --- | --- |
| `contentMode`<br>Document mode | HTML mode: structured layout with styles and preview. Plain mode: title + text only. |
| `title`<br>Title | Heading at the top of the PDF. Expressions are allowed. Leave empty for body text only. |
| `content`<br>Content | Plain text body (simple mode). Expressions are allowed. |
| `fileName`<br>File name | Suggested filename for the generated file (expressions allowed). |
| `pageSize`<br>Page size | A4 or Letter. |
| `margin`<br>Margins | Page margin in points (24–96). |
| `fontSize`<br>Base text size | Base size in points (8–32). Headings scale from this value. |

## Initial configuration

Initial catalog configuration example, to adapt before running. Keep secrets in credentials.

```json
{
  "contentMode": "html",
  "html": "",
  "css": "",
  "title": "",
  "content": "",
  "fileName": "document.pdf",
  "pageSize": "A4",
  "fontSize": 12,
  "margin": 50
}
```

## Verification

Test with representative data. Check node output in the inspector and logs, then use editor mapping for downstream fields. A trigger test with a simulated payload does not validate external service delivery.

See also : [Expressions and data](/docs/expressions), [Executions](/docs/executions), [Node catalog](/docs/nodes).

## Explore further

- [Features - nodulz](https://nodulz.com/product/overview)
- [Node catalog - nodulz](https://nodulz.com/product/catalog)
- [MCP server - nodulz](https://nodulz.com/product/mcp)
- [Pricing - nodulz](https://nodulz.com/pricing)
- [Use cases and workflow automation - nodulz](https://nodulz.com/use-cases)
- [Choose what your workflows can do. - nodulz](https://nodulz.com/compare)
- [Documentation - nodulz](https://nodulz.com/docs)
