# 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](/workflows/creating-and-editing.md), [Testing and Iteration](/workflows/testing-and-iteration.md), and [Error Handling](/workflows/error-handling.md)


---

# 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://docs.fetchhive.com/workflows/workflow-steps/utility/pdf-generation.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.
