> For the complete documentation index, see [llms.txt](https://docs.viesus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viesus.com/configuration/pdf-settings/folders-and-triggers.md).

# Folders & Triggers

## Folder configuration

Folder paths for the PDF processing workflow.

<table><thead><tr><th width="139.800048828125">Parameter</th><th width="83.5999755859375">Type</th><th width="184.39990234375">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>srcFolder</code></td><td>String</td><td><code>C:\ProgramData\…\PDFHotFolder</code></td><td>Source folder for input PDF files</td></tr><tr><td><code>destFolder</code></td><td>String</td><td><code>C:\ProgramData\…\PDFDestFolder</code></td><td>Destination folder for processed PDFs</td></tr><tr><td><code>archiveFolder</code></td><td>String</td><td><code>C:\ProgramData\…\ArchiveFolder</code></td><td>Archive folder for original files</td></tr><tr><td><code>statusFolder</code></td><td>String</td><td><code>C:\ProgramData\…\PDFDestFolder</code></td><td>Status folder for processing logs</td></tr><tr><td><code>debugFolder</code></td><td>String</td><td><code>""</code></td><td>Debug folder for diagnostic files</td></tr></tbody></table>

#### Folder requirements

* All folders must exist and be accessible to the PDF Enhancer process
* Source folder is monitored continuously for new PDF files
* Archive folder stores originals when archiving is enabled
* Debug folder contains diagnostic data only when `debug = 1`

***

## Trigger configuration

File-based processing triggers and completion notifications.

<table><thead><tr><th width="139">Parameter</th><th width="91">Type</th><th width="123.7999267578125">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>trigger</code></td><td>String</td><td><code>order.ready</code></td><td>Name of the trigger file to monitor</td></tr><tr><td><code>removeTrigger</code></td><td>Boolean</td><td>0</td><td>Remove trigger file after processing</td></tr><tr><td><code>renameTrigger</code></td><td>Boolean</td><td>1</td><td>Rename trigger file during processing</td></tr><tr><td><code>outTrigger</code></td><td>String</td><td><code>""</code></td><td>Output trigger file name (signals completion to downstream systems)</td></tr></tbody></table>

#### Trigger workflow

{% stepper %}
{% step %}

### Drop trigger file

Your upstream system places a file matching the `trigger` name (default `order.ready`) in the source folder once all PDFs for the order have been written.
{% endstep %}

{% step %}

### Enhancer picks it up

The PDF Enhancer detects the trigger file, then processes all PDFs in the source folder.
{% endstep %}

{% step %}

### Trigger handling

After processing, the trigger file is renamed (default) or deleted depending on `renameTrigger` and `removeTrigger` settings.
{% endstep %}

{% step %}

### Optional completion signal

If `outTrigger` is set, a completion file is written to the destination folder for downstream systems to detect.
{% endstep %}
{% endstepper %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.viesus.com/configuration/pdf-settings/folders-and-triggers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
