API Reference
Cmdlet
Set-OfficePdfBackground
Sets or clears the generated PDF page background color.
Remarks
Sets or clears the generated PDF page background color.
Examples
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:
ContextParameters
- Clear SwitchParameter
- Clear the generated PDF page background color.
- Color String
- Background color in #RRGGBB format.
- PassThru SwitchParameter
- Emit the updated document.
Outputs
OfficeIMO.Pdf.PdfDocument
Set-OfficePdfBackground [-Clear] [-Color <String>] -Document <PdfDocument> [-PassThru] [<CommonParameters>]#Parameter set:
DocumentParameters
- Clear SwitchParameter
- Clear the generated PDF page background color.
- Color String
- Background color in #RRGGBB format.
- Document PdfDocument
- PDF document to update outside the DSL context.
- PassThru SwitchParameter
- Emit the updated document.
Outputs
OfficeIMO.Pdf.PdfDocument