Cmdlet
Set-OfficePdfBackground
Sets or clears the generated PDF page background color.
Syntax
Examples
Set a generated PDF page background.
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.
Parameters
- -Clear SwitchParameter
- Clear the generated PDF page background color.
- -Color String
- Background color. Named colors and hexadecimal values are accepted.
- -PassThru SwitchParameter
- Emit the updated document.
- -Document PdfDocument
- Compatibility parameter. Page composition is supported only inside New-OfficePdf.
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.