# Add-OfficePdfBackgroundShape

Adds a decorative generated PDF page background shape or band.

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 **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: PdfBackgroundShape

**Module**

`PSWriteOffice`

**Aliases**

`PdfBackgroundShape`

**Inputs**

`OfficeIMO.Pdf.PdfDocument`

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[AddOfficePdfBackgroundShapeCommand.cs:25](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/AddOfficePdfBackgroundShapeCommand.cs#L25) 

Adds a decorative generated PDF page background shape or band.

## Syntax

```
Add-OfficePdfBackgroundShape
[-CornerRadius <Double>]
[-FillColor <String>]
[-FillOpacity <Double>]
[-Height <Double>]
[-InsetX <Double>]
[-InsetY <Double>]
[-OffsetX <Double>]
[-OffsetY <Double>]
[-PassThru]
[-Shape] <OfficePdfBackgroundShapeType>
[-StrokeColor <String>]
[-StrokeOpacity <Double>]
[-StrokeWidth <Double>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

[#](#method-add-officepdfbackgroundshape-double-string-double-double-double-double-double-double-switchparameter-officepdfbackgroundshapetype-string-double-double-double-double-double)

Parameter set: `Context`

```
Add-OfficePdfBackgroundShape
[-CornerRadius <Double>]
-Document <PdfDocument>
[-FillColor <String>]
[-FillOpacity <Double>]
[-Height <Double>]
[-InsetX <Double>]
[-InsetY <Double>]
[-OffsetX <Double>]
[-OffsetY <Double>]
[-PassThru]
[-Shape] <OfficePdfBackgroundShapeType>
[-StrokeColor <String>]
[-StrokeOpacity <Double>]
[-StrokeWidth <Double>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

[#](#method-add-officepdfbackgroundshape-double-pdfdocument-string-double-double-double-double-double-double-switchparameter-officepdfbackgroundshapetype-string-double-double-double-double-double)

Parameter set: `Document`

## Description

Background shapes are intended for subtle page structure such as header bands, side bands, highlight panels, or decorative accents. They are rendered behind generated content and should usually use restrained opacity values.

## Examples

### Add a header band and accent ellipse.

```powershell
New-OfficePdf -Path .\Report.pdf {
  PdfBackgroundShape -Shape TopBand -Height 86 -FillColor '#DBEAFE' -FillOpacity 0.75
  PdfBackgroundShape -Shape Ellipse -X 420 -Y 650 -Width 96 -Height 72 -FillColor '#99F6E4' -FillOpacity 0.35
  PdfHeading 'Styled report'
}
```

Creates a polished generated page background without hand-drawing PDF primitives.

## Parameters

**-CornerRadius Double optional**

Rounded rectangle or band corner radius in PDF points.

**-FillColor String optional**

Fill color. Named colors and hexadecimal values are accepted.

**-FillOpacity Double optional**

Fill opacity from 0 to 1.

**-Height Double optional**

Shape height in PDF points, or band height for top/bottom bands.

**-InsetX Double optional**

Horizontal inset for top/bottom bands in PDF points.

**-InsetY Double optional**

Vertical inset for left/right bands in PDF points.

**-OffsetX Double optional**

Horizontal offset for left/right bands in PDF points.

**-OffsetY Double optional**

Vertical offset for top/bottom bands in PDF points.

**-PassThru SwitchParameter optional**

Emit the updated document.

**-Shape OfficePdfBackgroundShapeType requiredposition: 0**

Shape type to add.

Possible values: `Rectangle`, `RoundedRectangle`, `Ellipse`, `TopBand`, `BottomBand`, `LeftBand`, `RightBand`

**-StrokeColor String optional**

Stroke color. Named colors and hexadecimal values are accepted.

**-StrokeOpacity Double optional**

Stroke opacity from 0 to 1.

**-StrokeWidth Double optional**

Stroke width in PDF points.

**-Width Double optional**

Shape width in PDF points, or band width for left/right bands.

**-X Double optional**

Shape left coordinate in PDF points for explicit shapes.

**-Y Double optional**

Shape bottom coordinate in PDF points for explicit shapes.

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

Compatibility parameter. Page composition is supported only inside New-OfficePdf.

## 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:48D331766F3774ED1A138FC552CB464C418173DC22676E075114E3F3A0DD95D2 -->
