Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
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

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.