Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficePdfTheme

Aliases: PdfTheme
Module PSWriteOffice
Aliases
PdfTheme
Inputs
OfficeIMO.Pdf.PdfDocument
Outputs
OfficeIMO.Pdf.PdfDocument

Applies an OfficeIMO.Pdf theme preset to a generated PDF document.

Syntax

Set-OfficePdfTheme [-PassThru] [-Theme] <WordLike|TechnicalDocument|Compact|Report> [<CommonParameters>]
#
Parameter set: Context
Set-OfficePdfTheme -Document <PdfDocument> [-PassThru] [-Theme] <WordLike|TechnicalDocument|Compact|Report> [<CommonParameters>]
#
Parameter set: Document

Description

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

Authored help example

Apply the report theme.

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.

Parameters

-PassThru SwitchParameter optional
Emit the updated document.
-Theme OfficePdfThemePreset requiredposition: 0
Theme preset to apply.
Possible values: WordLike, TechnicalDocument, Compact, Report
-Document PdfDocument requiredpipeline: True (ByValue)sets: Document
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.