Cmdlet
Add-OfficePdfHeading
Adds a heading to a PDF document.
Syntax
Add-OfficePdfHeading [-Align <Left|Center|Right|Justify>] [-Color <String>] [-Level <Int32>] [-PassThru] [-Text] <String> [<CommonParameters>]#Parameter set:
ContextAdd-OfficePdfHeading [-Align <Left|Center|Right|Justify>] [-Color <String>] -Document <PdfDocument> [-Level <Int32>] [-PassThru] [-Text] <String> [<CommonParameters>]#Parameter set:
DocumentExamples
Create heading levels in a PDF report.
New-OfficePdf -Path .\Examples\Documents\PdfHeadings.pdf {
Add-OfficePdfHeading -Text 'Service Review' -Level 1 -Color '#1D4ED8'
Add-OfficePdfHeading -Text 'Open risks' -Level 2
Add-OfficePdfParagraph -Text 'Heading levels create the report structure.'
}Adds report headings before body content.
Parameters
- -Align PdfAlign
- Heading alignment.
- Possible values:
Left,Center,Right,Justify - -Color String
- Optional heading color. Named colors and hexadecimal values are accepted.
- -Level Int32
- Heading level, 1 through 3.
- -PassThru SwitchParameter
- Emit the updated document.
- -Text String
- Heading text.
- -Document PdfDocument
- PDF document to update outside the DSL context.
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.