Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficePdfStamp

Module
PSWriteOffice
Inputs
OfficeIMO.Pdf.PdfDocument System.String[]
Outputs
OfficeIMO.Pdf.PdfDocument System.IO.FileInfo

Stamps text, images, native canvas content or a PDF page onto existing PDFs.

Syntax

Add-OfficePdfStamp
[-Behind]
[-Color <OfficeColor>]
[-Document <PdfDocument>]
[-Opacity <Double>]
[-Page <OfficePageSelector>]
[-PassThru]
[-Rotation <Double>]
[-Size <OfficeLength>]
-Text <String>
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: TextDocument
Add-OfficePdfStamp
[-Behind]
[-Color <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-Size <OfficeLength>]
-Text <String>
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Text
Add-OfficePdfStamp
[-Behind]
[-Color <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-Size <OfficeLength>]
-Text <String>
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: TextDirectory
Add-OfficePdfStamp
[-Behind]
[-Height <OfficeLength>]
[-IgnorePermissionRestrictions]
-ImagePath <String>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Image
Add-OfficePdfStamp
[-Behind]
[-Height <OfficeLength>]
[-IgnorePermissionRestrictions]
-ImagePath <String>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ImageDirectory
Add-OfficePdfStamp
[-Behind]
[-ConfigureRendering <ScriptBlock>]
-Content <ScriptBlock>
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Content
Add-OfficePdfStamp
[-Behind]
[-ConfigureRendering <ScriptBlock>]
-Content <ScriptBlock>
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ContentDirectory
Add-OfficePdfStamp
[-Behind]
[-Fit <Contain|Cover|Stretch>]
[-Height <OfficeLength>]
[-HorizontalAlignment <OfficeAlignment>]
[-IgnoreOverlayPermissionRestrictions]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-OverlayLoadOptions <PdfLoadOptions>]
[-OverlayPage <Int32>]
[-OverlayPassword <SecureString>]
-OverlayPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-VerticalAlignment <Top|Center|Bottom>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Page
Add-OfficePdfStamp
[-Behind]
[-Fit <Contain|Cover|Stretch>]
[-Height <OfficeLength>]
[-HorizontalAlignment <OfficeAlignment>]
[-IgnoreOverlayPermissionRestrictions]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-OverlayLoadOptions <PdfLoadOptions>]
[-OverlayPage <Int32>]
[-OverlayPassword <SecureString>]
-OverlayPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Rotation <Double>]
[-VerticalAlignment <Top|Center|Bottom>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: PageDirectory
Add-OfficePdfStamp
[-Behind]
[-Color <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-Size <OfficeLength>]
-Text <String>
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: TextLiteralPath
Add-OfficePdfStamp
[-Behind]
[-Height <OfficeLength>]
[-IgnorePermissionRestrictions]
-ImagePath <String>
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ImageLiteralPath
Add-OfficePdfStamp
[-Behind]
[-ConfigureRendering <ScriptBlock>]
-Content <ScriptBlock>
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ContentLiteralPath
Add-OfficePdfStamp
[-Behind]
[-Fit <Contain|Cover|Stretch>]
[-Height <OfficeLength>]
[-HorizontalAlignment <OfficeAlignment>]
[-IgnoreOverlayPermissionRestrictions]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputPath <String>
[-OverlayLoadOptions <PdfLoadOptions>]
[-OverlayPage <Int32>]
[-OverlayPassword <SecureString>]
-OverlayPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-VerticalAlignment <Top|Center|Bottom>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: PageLiteralPath
Add-OfficePdfStamp
[-Behind]
[-Color <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-Size <OfficeLength>]
-Text <String>
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: TextLiteralPathDirectory
Add-OfficePdfStamp
[-Behind]
[-Height <OfficeLength>]
[-IgnorePermissionRestrictions]
-ImagePath <String>
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ImageLiteralPathDirectory
Add-OfficePdfStamp
[-Behind]
[-Document <PdfDocument>]
[-Height <OfficeLength>]
-ImagePath <String>
[-Opacity <Double>]
[-Page <OfficePageSelector>]
[-PassThru]
[-Rotation <Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ImageDocument
Add-OfficePdfStamp
[-Behind]
[-ConfigureRendering <ScriptBlock>]
-Content <ScriptBlock>
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ContentLiteralPathDirectory
Add-OfficePdfStamp
[-Behind]
[-ConfigureRendering <ScriptBlock>]
[-Content] <ScriptBlock>
[-Document <PdfDocument>]
[-Opacity <Double>]
[-Page <OfficePageSelector>]
[-PassThru]
[-Rotation <Double>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: ContentDocument
Add-OfficePdfStamp
[-Behind]
[-Fit <Contain|Cover|Stretch>]
[-Height <OfficeLength>]
[-HorizontalAlignment <OfficeAlignment>]
[-IgnoreOverlayPermissionRestrictions]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-Opacity <Double>]
-OutputDirectory <String>
[-OverlayLoadOptions <PdfLoadOptions>]
[-OverlayPage <Int32>]
[-OverlayPassword <SecureString>]
-OverlayPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Password <SecureString>]
[-Rotation <Double>]
[-VerticalAlignment <Top|Center|Bottom>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: PageLiteralPathDirectory
Add-OfficePdfStamp
[-Behind]
[-Document <PdfDocument>]
[-Fit <Contain|Cover|Stretch>]
[-Height <OfficeLength>]
[-HorizontalAlignment <OfficeAlignment>]
[-IgnoreOverlayPermissionRestrictions]
[-Opacity <Double>]
[-OverlayLoadOptions <PdfLoadOptions>]
[-OverlayPage <Int32>]
[-OverlayPassword <SecureString>]
-OverlayPath <String>
[-Page <OfficePageSelector>]
[-PassThru]
[-Rotation <Double>]
[-VerticalAlignment <Top|Center|Bottom>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: PageDocument

Examples

Example 1

Add-OfficePdfStamp -Text 'Value'

Example 2

Add-OfficePdfStamp -Path @('C:\Path') -OutputPath 'C:\Path' -Content { }

Example 3

Add-OfficePdfStamp -Path @('C:\Path') -OutputDirectory 'Value' -Content { }

Parameters

-Behind SwitchParameter optional
Place the stamp behind existing page content.
-Color OfficeColor optionalsets: TextDocument, Text, TextDirectory, TextLiteralPath, TextLiteralPathDirectory
Native Color setting for the stamp.
-Document PdfDocument optionalpipeline: True (ByValue)sets: TextDocument, ImageDocument, ContentDocument, PageDocument
Caller-owned PDF; omission uses the enclosing editing block.
-Opacity Double optional
Native Opacity setting for the stamp.
-Page OfficePageSelector optional
Native one-based page selector, including last, odd and even.
-PassThru SwitchParameter optional
Return the saved FileInfo or the updated live document.
-Rotation Double optional
Native Rotation setting for the stamp.
-Size OfficeLength optionalsets: TextDocument, Text, TextDirectory, TextLiteralPath, TextLiteralPathDirectory
Text size; omission keeps the native 24-point default.
-Text String requiredsets: TextDocument, Text, TextDirectory, TextLiteralPath, TextLiteralPathDirectory
Literal text to stamp.
-X OfficeLength optional
Native X setting for the stamp.
-Y OfficeLength optional
Native Y setting for the stamp.
-WhatIf SwitchParameter optional
Shows what would happen if the command runs.
-Confirm SwitchParameter optional
Prompts for confirmation before running the command.
-IgnorePermissionRestrictions SwitchParameter optionalsets: Text, TextDirectory, Image, ImageDirectory, Content, ContentDirectory, Page, PageDirectory, TextLiteralPath, ImageLiteralPath, ContentLiteralPath, PageLiteralPath, TextLiteralPathDirectory, ImageLiteralPathDirectory, ContentLiteralPathDirectory, PageLiteralPathDirectory
After authentication, explicitly ignore owner-imposed restrictions.
-LoadOptions PdfLoadOptions optionalsets: Text, TextDirectory, Image, ImageDirectory, Content, ContentDirectory, Page, PageDirectory, TextLiteralPath, ImageLiteralPath, ContentLiteralPath, PageLiteralPath, TextLiteralPathDirectory, ImageLiteralPathDirectory, ContentLiteralPathDirectory, PageLiteralPathDirectory
Native input parsing, authentication and resource policy.
-OutputPath String requiredsets: Text, Image, Content, Page, TextLiteralPath, ImageLiteralPath, ContentLiteralPath, PageLiteralPath
Single output PDF file.
-Password SecureString optionalsets: Text, TextDirectory, Image, ImageDirectory, Content, ContentDirectory, Page, PageDirectory, TextLiteralPath, ImageLiteralPath, ContentLiteralPath, PageLiteralPath, TextLiteralPathDirectory, ImageLiteralPathDirectory, ContentLiteralPathDirectory, PageLiteralPathDirectory
Source PDF password.
-Path String[] requiredposition: 0sets: Text, TextDirectory, Image, ImageDirectory, Content, ContentDirectory, Page, PageDirectory
Input PDF files with FileSystem wildcard expansion.
-OutputDirectory String requiredsets: TextDirectory, ImageDirectory, ContentDirectory, PageDirectory, TextLiteralPathDirectory, ImageLiteralPathDirectory, ContentLiteralPathDirectory, PageLiteralPathDirectory
Output folder retaining source file names.
-Height OfficeLength optionalsets: Image, ImageDirectory, Page, PageDirectory, ImageLiteralPath, PageLiteralPath, ImageLiteralPathDirectory, ImageDocument, PageLiteralPathDirectory, PageDocument
Native Height setting for the stamp.
-ImagePath String requiredsets: Image, ImageDirectory, ImageLiteralPath, ImageLiteralPathDirectory, ImageDocument
Literal image file to stamp.
-Width OfficeLength optionalsets: Image, ImageDirectory, Page, PageDirectory, ImageLiteralPath, PageLiteralPath, ImageLiteralPathDirectory, ImageDocument, PageLiteralPathDirectory, PageDocument
Native Width setting for the stamp.
-ConfigureRendering ScriptBlock optionalsets: Content, ContentDirectory, ContentLiteralPath, ContentLiteralPathDirectory, ContentDocument
Configure native rendering options for the canvas callback.
-Content ScriptBlock requiredsets: Content, ContentDirectory, ContentLiteralPath, ContentLiteralPathDirectory, ContentDocument
Native canvas callback receiving the canvas and target page context.
-Fit PdfPageOverlayFit optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
Native Fit setting for the stamp.
Possible values: Contain, Cover, Stretch
-HorizontalAlignment OfficeAlignment optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
Native HorizontalAlignment setting for the stamp.
Possible values: Left, Center, Right, Justify, Start, End
-IgnoreOverlayPermissionRestrictions SwitchParameter optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
After overlay authentication, explicitly ignore owner-imposed restrictions.
-OverlayLoadOptions PdfLoadOptions optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
Native loading policy for the imported overlay PDF.
-OverlayPage Int32 optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
One-based page imported from the overlay PDF.
-OverlayPassword SecureString optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
Password for the imported overlay PDF.
-OverlayPath String requiredsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
Literal PDF file whose selected page is imported.
-VerticalAlignment OfficeTextVerticalAlignment optionalsets: Page, PageDirectory, PageLiteralPath, PageLiteralPathDirectory, PageDocument
Native VerticalAlignment setting for the stamp.
Possible values: Top, Center, Bottom
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: TextLiteralPath, ImageLiteralPath, ContentLiteralPath, PageLiteralPath, TextLiteralPathDirectory, ImageLiteralPathDirectory, ContentLiteralPathDirectory, PageLiteralPathDirectory
Literal PDF files, including FileInfo.FullName.

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.