API Reference
Cmdlet
Set-OfficePdfTheme
Applies an OfficeIMO.Pdf theme preset to a generated PDF document.
Remarks
Themes provide a reusable visual baseline for generated PDFs. They are OfficeIMO.Pdf presets, exposed by PSWriteOffice as simple enum values. Apply a theme near the start of a New-OfficePdf script block so later content inherits the intended report rhythm.
Examples
Apply the report theme.
PS>
New-OfficePdf -Path .\Report.pdf {
PdfTheme Report
PdfHeading 'Service Review'
PdfParagraph 'The report theme defines a polished baseline.'
}
Uses the PDF report theme for generated 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-OfficePdfTheme [-PassThru] -Theme <WordLike|TechnicalDocument|Compact|Report> [<CommonParameters>]#Parameter set:
ContextParameters
- PassThru SwitchParameter
- Emit the updated document.
- Theme OfficePdfThemePreset
- Theme preset to apply.
- Possible values:
WordLike,TechnicalDocument,Compact,Report
Outputs
OfficeIMO.Pdf.PdfDocument
Set-OfficePdfTheme -Document <PdfDocument> [-PassThru] -Theme <WordLike|TechnicalDocument|Compact|Report> [<CommonParameters>]#Parameter set:
DocumentParameters
- Document PdfDocument
- PDF document to update outside the DSL context.
- PassThru SwitchParameter
- Emit the updated document.
- Theme OfficePdfThemePreset
- Theme preset to apply.
- Possible values:
WordLike,TechnicalDocument,Compact,Report
Outputs
OfficeIMO.Pdf.PdfDocument