Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Remove-OfficePdfAnnotation

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

Removes native annotations selected by identity, page and subtype.

Syntax

Remove-OfficePdfAnnotation
[-Document <PdfDocument>]
[-KeepPopups]
[-ObjectNumber <Int32>]
[-Page <Int32>]
[-PassThru]
[-Subtype <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Document
Remove-OfficePdfAnnotation
[-IgnorePermissionRestrictions]
[-KeepPopups]
[-LoadOptions <PdfLoadOptions>]
[-ObjectNumber <Int32>]
-OutputPath <String>
[-Page <Int32>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Subtype <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: Path
Remove-OfficePdfAnnotation
[-IgnorePermissionRestrictions]
[-KeepPopups]
[-LoadOptions <PdfLoadOptions>]
[-ObjectNumber <Int32>]
-OutputDirectory <String>
[-Page <Int32>]
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-Subtype <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: PathDirectory
Remove-OfficePdfAnnotation
[-IgnorePermissionRestrictions]
[-KeepPopups]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-ObjectNumber <Int32>]
-OutputPath <String>
[-Page <Int32>]
[-PassThru]
[-Password <SecureString>]
[-Subtype <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: LiteralPath
Remove-OfficePdfAnnotation
[-IgnorePermissionRestrictions]
[-KeepPopups]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-ObjectNumber <Int32>]
-OutputDirectory <String>
[-Page <Int32>]
[-PassThru]
[-Password <SecureString>]
[-Subtype <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
#
Parameter set: LiteralPathDirectory

Description

Native confirmation runs before loading or editing a file. Live inputs stay caller-owned; a replacement document is adopted by the enclosing content block or returned for explicit assignment. PassThru returns native edit reports.

Examples

Example 1

Remove-OfficePdfAnnotation -Document 'Value'

Example 2

Remove-OfficePdfAnnotation -OutputPath 'C:\Path' -LiteralPath @('C:\Path')

Example 3

Remove-OfficePdfAnnotation -OutputDirectory 'Value' -LiteralPath @('C:\Path')

Parameters

-Document PdfDocument optionalpipeline: True (ByValue)sets: Document
Native caller-owned PDF; omission uses the enclosing content block.
-KeepPopups SwitchParameter optional
KeepPopups setting.
-ObjectNumber Int32 optional
ObjectNumber setting.
-Page Int32 optional
Page setting.
-PassThru SwitchParameter optional
Return native annotation edit reports.
-Subtype String optional
Subtype setting.
-WhatIf SwitchParameter optional
Shows what would happen if the command runs.
-Confirm SwitchParameter optional
Prompts for confirmation before running the command.
-IgnorePermissionRestrictions SwitchParameter optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
IgnorePermissionRestrictions setting.
-LoadOptions PdfLoadOptions optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
Native parsing, authentication and resource policy.
-OutputPath String requiredsets: Path, LiteralPath
Single-file destination.
-Password SecureString optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory
Password setting.
-Path String[] requiredposition: 0sets: Path, PathDirectory
Input PDF paths with wildcard expansion.
-OutputDirectory String requiredsets: PathDirectory, LiteralPathDirectory
Batch destination retaining source names.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath, LiteralPathDirectory
Literal input PDF paths; accepts 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.