API Reference

Cmdlet

Add-OfficePdfWatermark

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

Adds a generated-document text watermark.

Remarks

Adds a generated-document text watermark.

Examples

Authored help example

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: Context

Parameters

Color String optionalposition: namedpipeline: False
Optional watermark color in #RRGGBB format.
FontSize Nullable`1 optionalposition: namedpipeline: False
Watermark font size.
Opacity Nullable`1 optionalposition: namedpipeline: False
Watermark opacity, 0 through 1.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
RotationAngle Nullable`1 optionalposition: namedpipeline: False
Watermark rotation angle.
Text String requiredposition: 0pipeline: False
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: Document

Parameters

Color String optionalposition: namedpipeline: False
Optional watermark color in #RRGGBB format.
Document PdfDocument requiredposition: namedpipeline: True (ByValue)
PDF document to update outside the DSL context.
FontSize Nullable`1 optionalposition: namedpipeline: False
Watermark font size.
Opacity Nullable`1 optionalposition: namedpipeline: False
Watermark opacity, 0 through 1.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
RotationAngle Nullable`1 optionalposition: namedpipeline: False
Watermark rotation angle.
Text String requiredposition: 0pipeline: False
Watermark text.

Outputs

OfficeIMO.Pdf.PdfDocument