API Reference

Cmdlet

Add-OfficePdfStamp

Aliases: PdfStamp
Namespace PSWriteOffice
Aliases
PdfStamp
Inputs
None
Outputs
System.IO.FileInfo

Adds a text or image stamp to an existing PDF.

Remarks

Stamps are existing-PDF operations. Use text stamps for review labels and image stamps for logos or approval marks. Use -Watermark when the stamp should be placed behind existing page content.

Examples

Authored help example

Add a review stamp to selected pages.

PS>


$proof = @(
                Add-OfficePdfStamp -Path .\Examples\Documents\Report.pdf -OutputPath .\Examples\Documents\Stamped.pdf -Text 'REVIEWED' -Color '#0F766E' -FontSize 24 -Rotation 12 -PageRange '1-2'
                Get-OfficePdfPreflight -Path .\Examples\Documents\Stamped.pdf
            )
            $proof
        

Adds a text stamp to the first two pages and preflights the result.

Add an image watermark.

PS>


$logo = '.\Tests\Assets\CellImage.png'
            Add-OfficePdfStamp -Path .\Examples\Documents\Report.pdf -OutputPath .\Examples\Documents\Watermarked.pdf -Image $logo -Width 160 -Watermark
        

Adds a logo behind existing content as a watermark.

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-OfficePdfStamp [-Color <String>] [-FontSize <Double>] -OutputPath <String> [-PageRange <String>] -Path <String> [-Rotation <Double>] -Text <String> [-Watermark] [-X <Nullable`1>] [-Y <Nullable`1>] [<CommonParameters>]
#
Parameter set: Text

Parameters

Color String optionalposition: namedpipeline: False
Text color in #RRGGBB format.
FontSize Double optionalposition: namedpipeline: False
Font size for text stamps.
OutputPath String requiredposition: namedpipeline: False
Output PDF path.
PageRange String optionalposition: namedpipeline: False
Stamp selected pages, for example 1-3,5. Omit to stamp every page.
Path String requiredposition: namedpipeline: Falsealiases: FilePath
Input PDF path.
Rotation Double optionalposition: namedpipeline: False
Rotation in degrees.
Text String requiredposition: namedpipeline: False
Text to stamp.
Watermark SwitchParameter optionalposition: namedpipeline: False
Place the stamp behind existing content as a watermark.
X Nullable`1 optionalposition: namedpipeline: False
X coordinate in PDF points.
Y Nullable`1 optionalposition: namedpipeline: False
Y coordinate in PDF points.

Outputs

System.IO.FileInfo

Add-OfficePdfStamp [-Height <Nullable`1>] -Image <String> -OutputPath <String> [-PageRange <String>] -Path <String> [-Rotation <Double>] [-Watermark] [-Width <Nullable`1>] [-X <Nullable`1>] [-Y <Nullable`1>] [<CommonParameters>]
#
Parameter set: Image

Parameters

Height Nullable`1 optionalposition: namedpipeline: False
Rendered image height in PDF points.
Image String requiredposition: namedpipeline: Falsealiases: ImagePath
Image path to stamp.
OutputPath String requiredposition: namedpipeline: False
Output PDF path.
PageRange String optionalposition: namedpipeline: False
Stamp selected pages, for example 1-3,5. Omit to stamp every page.
Path String requiredposition: namedpipeline: Falsealiases: FilePath
Input PDF path.
Rotation Double optionalposition: namedpipeline: False
Rotation in degrees.
Watermark SwitchParameter optionalposition: namedpipeline: False
Place the stamp behind existing content as a watermark.
Width Nullable`1 optionalposition: namedpipeline: False
Rendered image width in PDF points.
X Nullable`1 optionalposition: namedpipeline: False
X coordinate in PDF points.
Y Nullable`1 optionalposition: namedpipeline: False
Y coordinate in PDF points.

Outputs

System.IO.FileInfo