Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePdfBackground

Aliases: PdfBackground
Module
PSWriteOffice
Aliases
PdfBackground
Inputs
None

Sets or clears color, image and shape backgrounds in the enclosing PDF composition.

Syntax

Set-OfficePdfBackground
[-Color] <OfficeColor>
[<CommonParameters>]
#
Parameter set: Color
Set-OfficePdfBackground
[-Fit <Stretch|Contain|Cover>]
-ImagePath <String>
[-Opacity <Double>]
[<CommonParameters>]
#
Parameter set: Image
Set-OfficePdfBackground
-Clear
[-Target <All|Color|Image|Shapes>]
[<CommonParameters>]
#
Parameter set: Clear

Examples

Example 1

Set-OfficePdfBackground -Color 'Value'

Example 2

Set-OfficePdfBackground -Clear

Example 3

Set-OfficePdfBackground -ImagePath 'C:\Path'

Parameters

-Color OfficeColor requiredposition: 0sets: Color
Background color.
-Fit OfficeImageFit optionalsets: Image
How the background image fits the page.
Possible values: Stretch, Contain, Cover
-ImagePath String requiredsets: Image
Literal background image path.
-Opacity Double optionalsets: Image
Background image opacity.
-Clear SwitchParameter requiredsets: Clear
Clear the selected background decoration.
-Target OfficePdfBackgroundTarget optionalsets: Clear
Background decorations to clear.
Possible values: All, Color, Image, Shapes

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.