API Reference
Cmdlet
Add-OfficePdfWatermark
Adds a generated-document text watermark.
Remarks
Adds a generated-document text watermark.
Examples
Add a draft watermark to every generated page.
PS>
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.
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.
Syntax
Add-OfficePdfWatermark [-Color <String>] [-FontSize <Nullable`1>] [-Opacity <Nullable`1>] [-PassThru] [-RotationAngle <Nullable`1>] -Text <String> [<CommonParameters>]#Parameter set:
ContextParameters
- Color String
- Optional watermark color in #RRGGBB format.
- FontSize Nullable`1
- Watermark font size.
- Opacity Nullable`1
- Watermark opacity, 0 through 1.
- PassThru SwitchParameter
- Emit the updated document.
- RotationAngle Nullable`1
- Watermark rotation angle.
- Text String
- Watermark text.
Outputs
OfficeIMO.Pdf.PdfDocument
Add-OfficePdfWatermark [-Color <String>] -Document <PdfDocument> [-FontSize <Nullable`1>] [-Opacity <Nullable`1>] [-PassThru] [-RotationAngle <Nullable`1>] -Text <String> [<CommonParameters>]#Parameter set:
DocumentParameters
- Color String
- Optional watermark color in #RRGGBB format.
- Document PdfDocument
- PDF document to update outside the DSL context.
- FontSize Nullable`1
- Watermark font size.
- Opacity Nullable`1
- Watermark opacity, 0 through 1.
- PassThru SwitchParameter
- Emit the updated document.
- RotationAngle Nullable`1
- Watermark rotation angle.
- Text String
- Watermark text.
Outputs
OfficeIMO.Pdf.PdfDocument