API Reference

Cmdlet

Set-OfficePdfBackground

Aliases: PdfBackground
Namespace PSWriteOffice
Aliases
PdfBackground
Inputs
OfficeIMO.Pdf.PdfDocument
Outputs
OfficeIMO.Pdf.PdfDocument

Sets or clears the generated PDF page background color.

Remarks

Sets or clears the generated PDF page background color.

Examples

Authored help example

Set a generated PDF page background.

PS>


New-OfficePdf -Path .\Examples\Documents\PdfBackground.pdf {
                Set-OfficePdfBackground -Color '#F8FAFC'
                Add-OfficePdfHeading -Text 'Report on a soft background'
                Add-OfficePdfParagraph -Text 'The background color applies to generated pages.'
            }
        

Applies a page background color before adding content.

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

Set-OfficePdfBackground [-Clear] [-Color <String>] [-PassThru] [<CommonParameters>]
#
Parameter set: Context

Parameters

Clear SwitchParameter optionalposition: namedpipeline: False
Clear the generated PDF page background color.
Color String optionalposition: namedpipeline: False
Background color in #RRGGBB format.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.

Outputs

OfficeIMO.Pdf.PdfDocument

Set-OfficePdfBackground [-Clear] [-Color <String>] -Document <PdfDocument> [-PassThru] [<CommonParameters>]
#
Parameter set: Document

Parameters

Clear SwitchParameter optionalposition: namedpipeline: False
Clear the generated PDF page background color.
Color String optionalposition: namedpipeline: False
Background 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.

Outputs

OfficeIMO.Pdf.PdfDocument