Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficePdfWatermark

Aliases: PdfWatermark
Module
PSWriteOffice
Aliases
PdfWatermark
Inputs
None

Adds a generated-document text watermark.

Syntax

Add-OfficePdfWatermark
[-Color <OfficeColor>]
[-Opacity <Double>]
[-Rotation <Double>]
[-Size <OfficeLength>]
[-Text] <String>
[<CommonParameters>]
#
Parameter set: Context

Examples

Add a draft watermark to every generated page.

New-OfficePdf -Path .\Examples\Documents\PdfWatermark.pdf {
    Add-OfficePdfWatermark -Text 'DRAFT' -Size 72 -Opacity 0.12 -Rotation -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 OfficeColor optional
Optional watermark color. Named colors and hexadecimal values are accepted.
-Opacity Double optional
Watermark opacity, 0 through 1.
-Rotation Double optional
Watermark rotation angle.
-Size OfficeLength optional
Watermark font size.
-Text String requiredposition: 0
Watermark text.

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.