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

Add-OfficePdfWatermark

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

Adds a generated-document text watermark.

Syntax

Add-OfficePdfWatermark
[-Color <String>]
[-FontSize <Double>]
[-Opacity <Double>]
[-PassThru]
[-RotationAngle <Double>]
[-Text] <String>
[<CommonParameters>]
#
Parameter set: Context
Add-OfficePdfWatermark
[-Color <String>]
-Document <PdfDocument>
[-FontSize <Double>]
[-Opacity <Double>]
[-PassThru]
[-RotationAngle <Double>]
[-Text] <String>
[<CommonParameters>]
#
Parameter set: Document

Examples

Add a draft watermark to every generated page.

New-OfficePdf -Path .\Examples\Documents\PdfWatermark.pdf {
    Add-OfficePdfWatermark -Text 'DRAFT' -FontSize 72 -Opacity 0.12 -RotationAngle -35 -Color '#64748B'
    Add-OfficePdfHeading -Text 'Draft service review'
    Add-OfficePdfParagraph -Text 'This copy is not final.'
}

Adds a text watermark while generating the PDF.

Parameters

-Color String optional
Optional watermark color. Named colors and hexadecimal values are accepted.
-FontSize Double optional
Watermark font size.
-Opacity Double optional
Watermark opacity, 0 through 1.
-PassThru SwitchParameter optional
Emit the updated document.
-RotationAngle Double optional
Watermark rotation angle.
-Text String requiredposition: 0
Watermark text.
-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.