API Reference

Cmdlet

Add-OfficePdfHorizontalRule

Aliases: PdfHorizontalRule, PdfHr
Namespace PSWriteOffice
Aliases
PdfHorizontalRule PdfHr
Inputs
OfficeIMO.Pdf.PdfDocument
Outputs
OfficeIMO.Pdf.PdfDocument

Adds a horizontal rule divider to a generated PDF document.

Remarks

Adds a horizontal rule divider to a generated PDF document.

Examples

Authored help example

Separate report sections with a divider.

PS>


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.

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.

Syntax

Add-OfficePdfHorizontalRule [-Color <String>] [-PassThru] [-SpacingAfter <Nullable`1>] [-SpacingBefore <Nullable`1>] [-Thickness <Nullable`1>] [<CommonParameters>]
#
Parameter set: Context

Parameters

Color String optionalposition: namedpipeline: False
Rule color in #RRGGBB format.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
SpacingAfter Nullable`1 optionalposition: namedpipeline: False
Spacing after the rule in PDF points.
SpacingBefore Nullable`1 optionalposition: namedpipeline: False
Spacing before the rule in PDF points.
Thickness Nullable`1 optionalposition: namedpipeline: False
Rule thickness in PDF points.

Outputs

OfficeIMO.Pdf.PdfDocument

Add-OfficePdfHorizontalRule [-Color <String>] -Document <PdfDocument> [-PassThru] [-SpacingAfter <Nullable`1>] [-SpacingBefore <Nullable`1>] [-Thickness <Nullable`1>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Color String optionalposition: namedpipeline: False
Rule color in #RRGGBB format.
Document PdfDocument requiredposition: namedpipeline: True (ByValue)
PDF document to update outside the DSL context.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
SpacingAfter Nullable`1 optionalposition: namedpipeline: False
Spacing after the rule in PDF points.
SpacingBefore Nullable`1 optionalposition: namedpipeline: False
Spacing before the rule in PDF points.
Thickness Nullable`1 optionalposition: namedpipeline: False
Rule thickness in PDF points.

Outputs

OfficeIMO.Pdf.PdfDocument