# Merge PDF files

Merge PDF files 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 merge existing PDF files from a PowerShell workflow.

This pattern is useful when a process produces separate PDF artifacts that need to be combined.

It comes from the source example at `Example/Example03.Merging/Example03.ps1`.

## When to use this pattern

- You receive multiple PDFs from upstream steps.
- The output should be one merged document.
- You want the merge step to be scriptable.

## Example

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

$inputFiles = @(
    "$PSScriptRoot\Input\OutputDocument0.pdf"
    "$PSScriptRoot\Input\OutputDocument1.pdf"
)
$outputFile = "$PSScriptRoot\Output\OutputDocument.pdf"

Merge-PDF -InputFile $inputFiles -OutputFile $outputFile -Verbose
```

## What this demonstrates

- using an array of input files
- writing a deterministic output path
- adding PDF merge to a larger automation

## Source

- [Example03.ps1](https://github.com/EvotecIT/PSWritePDF/blob/master/Example/Example03.Merging/Example03.ps1)

<!-- PowerForge markdown artifact sha256:66A7FA63863268C0737EEA6A631C78B4043440E4D5FB6680DE764D465A0F5F0B -->
