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>] -OutputPath <String> [-PageRange <String>] -Path <String> [-Rotation <Double>] -Text <String> [-Watermark] [-X <Nullable`1>] [-Y <Nullable`1>] [<CommonParameters>]#Parameter set:
TextParameters
- Color String
- Text color in #RRGGBB format.
- FontSize Double
- Font size for text stamps.
- OutputPath String
- Output PDF path.
- PageRange String
- Stamp selected pages, for example 1-3,5. Omit to stamp every page.
- 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 Nullable`1
- X coordinate in PDF points.
- Y Nullable`1
- 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:
ImageParameters
- Height Nullable`1
- Rendered image height in PDF points.
- 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.
- Path String
- Input PDF path.
- Rotation Double
- Rotation in degrees.
- Watermark SwitchParameter
- Place the stamp behind existing content as a watermark.
- Width Nullable`1
- Rendered image width in PDF points.
- X Nullable`1
- X coordinate in PDF points.
- Y Nullable`1
- Y coordinate in PDF points.
Outputs
System.IO.FileInfo