Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficePdfStamp

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

Adds a text or image stamp to an existing PDF.

Syntax

Add-OfficePdfStamp [-Color <String>] [-FontSize <Double>] [-IgnorePermissionRestrictions] -OutputPath <String> [-PageRange <String>] [-PassThru] [-Password <String>] -Path <String> [-Rotation <Double>] -Text <String> [-Watermark] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: Text
Add-OfficePdfStamp [-Height <Double>] [-IgnorePermissionRestrictions] -Image <String> -OutputPath <String> [-PageRange <String>] [-PassThru] [-Password <String>] -Path <String> [-Rotation <Double>] [-Watermark] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: Image

Description

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.

$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.

$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.

Parameters

-Color String optionalsets: Text
Text color. Named colors and hexadecimal values are accepted.
-FontSize Double optionalsets: Text
Font size for text stamps.
-IgnorePermissionRestrictions SwitchParameter optional
After successful password authentication, explicitly ignore owner-imposed usage restrictions. This does not discover, bypass, or crack a missing password.
-OutputPath String required
Output PDF path.
-PageRange String optional
Stamp selected pages, for example 1-3,5. Omit to stamp every page.
-PassThru SwitchParameter optional
Emit the object created or changed by the command.
-Password String optional
Password used to authenticate an encrypted input PDF.
-Path String requiredaliases: FilePath
Input PDF path.
-Rotation Double optional
Rotation in degrees.
-Text String requiredsets: Text
Text to stamp.
-Watermark SwitchParameter optional
Place the stamp behind existing content as a watermark.
-X Double optional
X coordinate in PDF points.
-Y Double optional
Y coordinate in PDF points.
-Height Double optionalsets: Image
Rendered image height in PDF points.
-Image String requiredaliases: ImagePathsets: Image
Image path to stamp.
-Width Double optionalsets: Image
Rendered image width in PDF points.

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.