> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_p_d_f_gen.md).

# PDFGen

**Usage:** `api.PDFGen.Generate_EPE(ok => {})`

Generate the student "Microgrid Report" PDF. Set [SLDTarget](/engine/home/doxygen_synced/classes/class_p_d_f_gen.md) and [completedconfigs](/engine/home/doxygen_synced/classes/class_p_d_f_gen.md) first, then call [Generate\_EPE](/engine/home/doxygen_synced/classes/class_p_d_f_gen.md).

## Public Functions

|             | Name                                                                                                                                                                                                                                                                                                                                                    |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| void        | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_p_d_f_gen.md#function-generate_epe"><strong>Generate\_EPE</strong></a>(Action< bool > callback)<br>Generates the student report PDF. Your callback receives true when it is finished, or false right away if a report is already being generated.</p> |
| IEnumerator | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_p_d_f_gen.md#function-buildpdfepe"><strong>BuildPdfEPE</strong></a>(Action< bool > callback)<br>The work behind Generate\_EPE. Prefer calling Generate\_EPE instead of this directly.</p>                                                             |

## Public Attributes

|              | Name                                                                                                                                                                                                                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Coroutine    | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_p_d_f_gen.md#variable-coroutine"><strong>coroutine</strong></a><br>Non-null while a report is being generated. Used to prevent starting a second one.</p>                                |
| GameObject   | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_p_d_f_gen.md#variable-sldtarget"><strong>SLDTarget</strong></a><br>The single-line-diagram UI to include as an image, or null to leave it out.</p>                                       |
| List< bool > | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_p_d_f_gen.md#variable-completedconfigs"><strong>completedconfigs</strong></a><br>Which of the three scenarios to include: \[no-shading sunny, partial shading 1, partial shading 2].</p> |

## Public Functions Documentation

### function Generate\_EPE

```csharp
static void Generate_EPE(
    Action< bool > callback
)
```

Generates the student report PDF. Your callback receives true when it is finished, or false right away if a report is already being generated.

**Parameters**:

* **callback** Receives true when done, or false if a report is already in progress.

### function BuildPdfEPE

```csharp
static IEnumerator BuildPdfEPE(
    Action< bool > callback
)
```

The work behind Generate\_EPE. Prefer calling Generate\_EPE instead of this directly.

**Parameters**:

* **callback** Called with true when the report has been generated.

**Return**: Coroutine enumerator.

## Public Attributes Documentation

### variable coroutine

```csharp
static Coroutine coroutine;
```

Non-null while a report is being generated. Used to prevent starting a second one.

### variable SLDTarget

```csharp
static GameObject SLDTarget;
```

The single-line-diagram UI to include as an image, or null to leave it out.

### variable completedconfigs

```csharp
static List< bool > completedconfigs;
```

Which of the three scenarios to include: \[no-shading sunny, partial shading 1, partial shading 2].

***

Updated on 2026-07-22 at 12:00:00 +0800
