API Reference
Cmdlet
Set-OfficePdfBackgroundImage
Sets or clears a generated PDF page background image.
Remarks
Background images are applied through OfficeIMO.Pdf and rendered behind normal generated content. Use low opacity for watermark-like page texture and -Clear to remove a previously configured background image.
Examples
Add a subtle background image.
PS>
New-OfficePdf -Path .\Report.pdf {
PdfBackgroundImage -Path .\letterhead.png -Fit Cover -Opacity 0.08
PdfHeading 'Branded report'
}
Uses an image as a low-opacity page background.
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-OfficePdfBackgroundImage [-Clear] [-Fit <Stretch|Contain|Cover>] [-Opacity <Nullable`1>] [-PassThru] [-Path <String>] [<CommonParameters>]#Parameter set:
ContextParameters
- Clear SwitchParameter
- Clear the generated PDF background image.
- Fit OfficeImageFit
- How the image should fit the page box.
- Possible values:
Stretch,Contain,Cover - Opacity Nullable`1
- Image opacity from 0 to 1.
- PassThru SwitchParameter
- Emit the updated document.
- Path String
- Background image path.
Outputs
OfficeIMO.Pdf.PdfDocument
Set-OfficePdfBackgroundImage [-Clear] -Document <PdfDocument> [-Fit <Stretch|Contain|Cover>] [-Opacity <Nullable`1>] [-PassThru] [-Path <String>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Clear SwitchParameter
- Clear the generated PDF background image.
- Document PdfDocument
- PDF document to update outside the DSL context.
- Fit OfficeImageFit
- How the image should fit the page box.
- Possible values:
Stretch,Contain,Cover - Opacity Nullable`1
- Image opacity from 0 to 1.
- PassThru SwitchParameter
- Emit the updated document.
- Path String
- Background image path.
Outputs
OfficeIMO.Pdf.PdfDocument