# PDF Generation

Use **PDF Generation** when you want a workflow step to turn markdown content into a PDF result that later steps or runs can reference.

## Configuration

| Option                                                              | Required | Description                                                                                              |
| ------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| Name                                                                | No       | Label for the step in the workflow canvas.                                                               |
| Content                                                             | Yes      | Content in **Content**. This field supports markdown and workflow variables through **Insert Variable**. |
| When the step fails                                                 | No       | Controls whether the workflow should **Terminate Workflow** or **Continue** if this step fails.          |
| Add this step from the **Generation** group in **Search steps...**. |          |                                                                                                          |

The **Content** field supports markdown formatting. Use **Insert Variable** to combine text from **Inputs** or earlier **Workflow Steps** before you generate the PDF.

## Output

Click **Run** in the step header to test the step. Fetch Hive shows the generated result in **Output** after the run completes.

Use the variable picker in a later step to insert the exact output path available for that run. The base reference is:

```
{{STEP_IDENTIFIER.output}}
```

Use the variable picker if you need a deeper field or file reference from the generated PDF result.

## Example

Add **PDF Generation** from the **Generation** group in **Search steps...**.

Set **Name** to something like `Create weekly report PDF`.

Write the document in **Content** with markdown headings, lists, and inserted workflow values such as `{{step_2.output.summary}}`.

Choose what should happen in **When the step fails**.

Click **Run** and check **Output** to confirm the generated result before using it elsewhere in the workflow.

## Notes

* This page lives under `utility` in the docs tree, but the actual step appears under **Generation** in the Fetch Hive step picker.
* The **Content** field supports markdown, so you can format headings, lists, and sections before generating the PDF.
* Use **Insert Variable** if the PDF should include text produced by earlier workflow steps.

See also: [Creating and Editing](https://docs.fetchhive.com/workflows/creating-and-editing), [Testing and Iteration](https://docs.fetchhive.com/workflows/testing-and-iteration), and [Error Handling](https://docs.fetchhive.com/workflows/error-handling)
