# Set-OfficePdfHeader

Composes running PDF Header text, child runs or the native builder inside New-OfficePdf.

Cmdlet 

Aliases: PdfHeader

**Module**

`PSWriteOffice`

**Aliases**

`PdfHeader`

**Inputs**

`None`

**Outputs**

`System.Void`

**Source**

[SetOfficePdfHeaderCommand.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/SetOfficePdfHeaderCommand.cs#L15) 

Composes running PDF Header text, child runs or the native builder inside New-OfficePdf.

## Syntax

```
Set-OfficePdfHeader
[-Alignment <OfficeAlignment>]
[-EvenPage]
[-FirstPage]
[-Size <OfficeLength>]
[-Text] <String>
[<CommonParameters>]
```

[#](#method-set-officepdfheader-officealignment-switchparameter-switchparameter-officelength-string)

Parameter set: `Text`

```
Set-OfficePdfHeader
[-Alignment <OfficeAlignment>]
[-Content] <ScriptBlock>
[-EvenPage]
[-FirstPage]
[-Size <OfficeLength>]
[<CommonParameters>]
```

[#](#method-set-officepdfheader-officealignment-scriptblock-switchparameter-switchparameter-officelength)

Parameter set: `Content`

```
Set-OfficePdfHeader
-Compose <ScriptBlock>
[<CommonParameters>]
```

[#](#method-set-officepdfheader-scriptblock)

Parameter set: `Builder`

## Examples

### Add a styled running Header.

```powershell
New-OfficePdf ./Report.pdf { PdfHeader { PdfText 'Internal' -Italic }; PdfParagraph 'Report' }
```

## Parameters

**-Alignment OfficeAlignment optionalsets: Text, Content**

Text alignment.

Possible values: `Left`, `Center`, `Right`, `Justify`, `Start`, `End`

**-EvenPage SwitchParameter optionalsets: Text, Content**

Configure the even page variant.

**-FirstPage SwitchParameter optionalsets: Text, Content**

Configure the first page variant.

**-Size OfficeLength optionalsets: Text, Content**

Text size; bare numbers mean points.

**-Text String requiredposition: 0sets: Text**

Running text supporting {page} and {pages} tokens.

**-Content ScriptBlock requiredposition: 0sets: Content**

Styled PdfText child commands.

**-Compose ScriptBlock requiredsets: Builder**

Advanced native Header builder, passed as the script argument.

## 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:E1E205FEE3A44743F94439E5C13232020BFDE2D418886700BF52BAD3311C0163 -->
