Cmdlet
Add-OfficePdfHorizontalRule
Adds a horizontal rule divider to a generated PDF document.
Syntax
Add-OfficePdfHorizontalRule [-Color <String>] [-PassThru] [-SpacingAfter <Double>] [-SpacingBefore <Double>] [-Thickness <Double>] [<CommonParameters>]#Parameter set:
ContextAdd-OfficePdfHorizontalRule [-Color <String>] -Document <PdfDocument> [-PassThru] [-SpacingAfter <Double>] [-SpacingBefore <Double>] [-Thickness <Double>] [<CommonParameters>]#Parameter set:
DocumentExamples
Separate report sections with a divider.
New-OfficePdf -Path .\Examples\Documents\PdfDivider.pdf {
Add-OfficePdfHeading -Text 'Executive summary'
Add-OfficePdfParagraph -Text 'The service is healthy.'
Add-OfficePdfHorizontalRule -Color '#CBD5E1' -Thickness 0.75 -SpacingBefore 10 -SpacingAfter 10
Add-OfficePdfHeading -Text 'Signals' -Level 2
}Adds a visual divider between generated PDF sections.
Parameters
- -Color String
- Rule color. Named colors and hexadecimal values are accepted.
- -PassThru SwitchParameter
- Emit the updated document.
- -SpacingAfter Double
- Spacing after the rule in PDF points.
- -SpacingBefore Double
- Spacing before the rule in PDF points.
- -Thickness Double
- Rule thickness in PDF points.
- -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.