# Add-OfficePdfSpacer

Adds invisible vertical spacing to a generated PDF document.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PdfSpace, PdfSpacer

**Module**

`PSWriteOffice`

**Aliases**

`PdfSpace` `PdfSpacer`

**Inputs**

`OfficeIMO.Pdf.PdfDocument`

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[AddOfficePdfSpacerCommand.cs:22](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfSpacerCommand.cs#L22) 

Adds invisible vertical spacing to a generated PDF document.

## Syntax

```
Add-OfficePdfSpacer
[-Height] <Double>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officepdfspacer-double-switchparameter)

Parameter set: `Context`

```
Add-OfficePdfSpacer
-Document <PdfDocument>
[-Height] <Double>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officepdfspacer-pdfdocument-double-switchparameter)

Parameter set: `Document`

## Examples

### Add vertical rhythm between sections.

```powershell
New-OfficePdf -Path .\Examples\Documents\PdfSpacer.pdf {
    Add-OfficePdfHeading -Text 'Summary'
    Add-OfficePdfParagraph -Text 'First block.'
    Add-OfficePdfSpacer -Height 18
    Add-OfficePdfParagraph -Text 'Second block after additional spacing.'
}
```

Adds whitespace without adding visible content.

## Parameters

**-Height Double requiredposition: 0**

Vertical space height in PDF points.

**-PassThru SwitchParameter optional**

Emit the updated document.

**-Document PdfDocument requiredpipeline: True (ByValue)sets: Document**

PDF document to update outside the DSL context.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

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