# Create a simple PDF

Create a simple PDF on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

PSWritePDF

PowerShell Module to create, edit, split, merge PDF files on Windows / Linux and MacOS

[View on GitHub](https://github.com/EvotecIT/PSWritePDF) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWritePDF/releases/tag/v0.0.20) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWritePDF)

Stars**232**

Forks**22**

Open issues**0**

PowerShell Gallery downloads**579286**

Release**v0.0.20**

Language: C# Updated: 2026-06-23

Curated Examples

Use PSWritePDF to create a small document from PowerShell.

This pattern is useful when a script needs to emit a compact PDF artifact.

It comes from the source example at `Example/Example01.HelloWorld/Example01_Simple.ps1`.

## When to use this pattern

- You need a generated PDF artifact.
- The content can be authored directly in PowerShell.
- You want to combine text and simple lists.

## Example

```powershell
Import-Module .\PSWritePDF.psd1 -Force

New-PDF {
    New-PDFText -Text 'Hello ', 'World' -Font HELVETICA, TIMES_ITALIC -FontColor GRAY, BLUE
    New-PDFText -Text 'Generated from PowerShell.' -Font HELVETICA -FontColor RED
    New-PDFList -Indent 3 {
        New-PDFListItem -Text 'First item'
        New-PDFListItem -Text 'Second item'
    }
} -FilePath "$PSScriptRoot\Example01_Simple.pdf" -Show
```

## What this demonstrates

- creating a document in a script block
- combining text and list elements
- writing the generated file to disk

## Source

- [Example01_Simple.ps1](https://github.com/EvotecIT/PSWritePDF/blob/master/Example/Example01.HelloWorld/Example01_Simple.ps1)

<!-- PowerForge markdown artifact sha256:D62A3A8DCD06EB1C5BD2C3397B41AFC856AE393AFE6985E25D0E504F18B26A6A -->
