# Set-OfficePdfPageBorder

Sets or clears the generated PDF page border decoration.

Cmdlet 

Aliases: PdfPageBorder

**Module**

`PSWriteOffice`

**Aliases**

`PdfPageBorder`

**Inputs**

`None`

**Source**

[SetOfficePdfPageBorderCommand.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/SetOfficePdfPageBorderCommand.cs#L22) 

Sets or clears the generated PDF page border decoration.

## Syntax

```
Set-OfficePdfPageBorder
[-Color <OfficeColor>]
[-DashStyle <Solid|Dash|Dot|DashDot|DashDotDot>]
[-Inset <OfficeLength>]
[-Opacity <Double>]
[-Width <OfficeLength>]
[<CommonParameters>]
```

[#](#method-set-officepdfpageborder-officecolor-officestrokedashstyle-officelength-double-officelength)

Parameter set: `Border`

```
Set-OfficePdfPageBorder
-Clear
[<CommonParameters>]
```

[#](#method-set-officepdfpageborder-switchparameter)

Parameter set: `Clear`

## Examples

### Add a subtle page border.

```powershell
New-OfficePdf -Path .\Examples\Documents\PdfPageBorder.pdf {
    Set-OfficePdfPageBorder -Color '#CBD5E1' -Width 0.75 -Inset 24 -Opacity 0.8
    Add-OfficePdfHeading -Text 'Bordered report'
}
```

Decorates generated pages with an OfficeIMO.Pdf page border.

## Parameters

**-Color OfficeColor optionalsets: Border**

Border color. Named colors and hexadecimal values are accepted.

**-DashStyle OfficeStrokeDashStyle optionalsets: Border**

Border dash style.

Possible values: `Solid`, `Dash`, `Dot`, `DashDot`, `DashDotDot`

**-Inset OfficeLength optionalsets: Border**

Distance from the page edge to the border path in PDF points.

**-Opacity Double optionalsets: Border**

Border opacity from 0 through 1.

**-Width OfficeLength optionalsets: Border**

Border stroke width in PDF points.

**-Clear SwitchParameter requiredsets: Clear**

Clear the generated PDF page border decoration.

## 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).

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