Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePdfHeader

Aliases: PdfHeader
Module
PSWriteOffice
Aliases
PdfHeader
Inputs
None
Outputs
System.Void

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>]
#
Parameter set: Text
Set-OfficePdfHeader
[-Alignment <OfficeAlignment>]
[-Content] <ScriptBlock>
[-EvenPage]
[-FirstPage]
[-Size <OfficeLength>]
[<CommonParameters>]
#
Parameter set: Content
Set-OfficePdfHeader
-Compose <ScriptBlock>
[<CommonParameters>]
#
Parameter set: Builder

Examples

Add a styled running Header.

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.