Cmdlet
Add-OfficePdfWatermark
Adds a generated-document text watermark.
Syntax
Add-OfficePdfWatermark [-Color <String>] [-FontSize <Double>] [-Opacity <Double>] [-PassThru] [-RotationAngle <Double>] [-Text] <String> [<CommonParameters>]#Parameter set:
ContextAdd-OfficePdfWatermark [-Color <String>] -Document <PdfDocument> [-FontSize <Double>] [-Opacity <Double>] [-PassThru] [-RotationAngle <Double>] [-Text] <String> [<CommonParameters>]#Parameter set:
DocumentExamples
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 watermark color. Named colors and hexadecimal values are accepted.
- -FontSize Double
- Watermark font size.
- -Opacity Double
- Watermark opacity, 0 through 1.
- -PassThru SwitchParameter
- Emit the updated document.
- -RotationAngle Double
- Watermark rotation angle.
- -Text String
- Watermark text.
- -Document PdfDocument
- 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.