API Reference
Cmdlet
Add-OfficePdfStamp
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
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>] [-IgnorePermissionRestrictions] -OutputPath <String> [-PageRange <String>] [-Password <String>] -Path <String> [-Rotation <Double>] -Text <String> [-Watermark] [-X <Double>] [-Y <Double>] [<CommonParameters>]#Parameter set:
TextParameters
- Color String
- Text color in #RRGGBB format.
- FontSize Double
- Font size for text stamps.
- IgnorePermissionRestrictions SwitchParameter
- After successful password authentication, explicitly ignore owner-imposed usage restrictions. This does not discover, bypass, or crack a missing password.
- OutputPath String
- Output PDF path.
- PageRange String
- Stamp selected pages, for example 1-3,5. Omit to stamp every page.
- Password String
- Password used to authenticate an encrypted input PDF.
- Path String
- Input PDF path.
- Rotation Double
- Rotation in degrees.
- Text String
- Text to stamp.
- Watermark SwitchParameter
- Place the stamp behind existing content as a watermark.
- X Double
- X coordinate in PDF points.
- Y Double
- Y coordinate in PDF points.
Outputs
System.IO.FileInfo
Add-OfficePdfStamp [-Height <Double>] [-IgnorePermissionRestrictions] -Image <String> -OutputPath <String> [-PageRange <String>] [-Password <String>] -Path <String> [-Rotation <Double>] [-Watermark] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]#Parameter set:
ImageParameters
- Height Double
- Rendered image height in PDF points.
- IgnorePermissionRestrictions SwitchParameter
- After successful password authentication, explicitly ignore owner-imposed usage restrictions. This does not discover, bypass, or crack a missing password.
- Image String
- Image path to stamp.
- OutputPath String
- Output PDF path.
- PageRange String
- Stamp selected pages, for example 1-3,5. Omit to stamp every page.
- Password String
- Password used to authenticate an encrypted input PDF.
- Path String
- Input PDF path.
- Rotation Double
- Rotation in degrees.
- Watermark SwitchParameter
- Place the stamp behind existing content as a watermark.
- Width Double
- Rendered image width in PDF points.
- X Double
- X coordinate in PDF points.
- Y Double
- Y coordinate in PDF points.
Outputs
System.IO.FileInfo