Cmdlet
Add-OfficePdfPageNumber
Inserts a live page number (optionally 'of total') inside PdfHeader or PdfFooter.
Syntax
Add-OfficePdfPageNumber
[-BackgroundColor <OfficeColor>]
[-Baseline <Normal| Superscript| Subscript>]
[-Bold]
[-Color <OfficeColor>]
[-Font <String>]
[-IncludeTotal]
[-Italic]
[-Separator <String>]
[-Size <OfficeLength>]
[-Strikethrough]
[-Underline <OfficeTextDecorationStyle>]
[<CommonParameters>]#Parameter set:
ContextExamples
Use the native OfficePdfPageNumber command.
New-OfficePdf -Path .\Numbered.pdf {
PdfFooter {
PdfText 'Page '
PdfPageNumber -IncludeTotal
}
PdfParagraph 'Body text.'
}Parameters
- -BackgroundColor OfficeColor
- BackgroundColor for this operation.
- -Baseline PdfTextBaseline
- Baseline for this operation.
- Possible values:
Normal,Superscript,Subscript - -Bold SwitchParameter
- Bold for this operation.
- -Color OfficeColor
- Color for this operation.
- -Font String
- Font family name or standard PDF font; completes from the theme and registered fonts.
- -IncludeTotal SwitchParameter
- IncludeTotal for this operation.
- -Italic SwitchParameter
- Italic for this operation.
- -Separator String
- Separator for this operation.
- -Size OfficeLength
- Size for this operation.
- -Strikethrough SwitchParameter
- Strikethrough for this operation.
- -Underline OfficeTextDecorationStyle
- Shared underline style; bare -Underline means Single.
- Possible values:
Single,Double,Dotted,Dashed,Wavy,Words
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.