Cmdlet
Remove-OfficePdfContent
Permanently removes (redacts) text, pattern matches or areas from a PDF and writes a new PDF.
Syntax
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Text <String[]>
[<CommonParameters>]#Parameter set:
TextRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Text <String[]>
[<CommonParameters>]#Parameter set:
TextDirectoryRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Pattern <String[]>
[<CommonParameters>]#Parameter set:
PatternRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Pattern <String[]>
[<CommonParameters>]#Parameter set:
PatternDirectoryRemove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]#Parameter set:
AreaRemove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]#Parameter set:
AreaDirectoryRemove-OfficePdfContent
[-FillColor <OfficeColor>]
-Height <OfficeLength>
[-IgnorePermissionRestrictions]
[-Label <String>]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
-Page <Int32>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Width <OfficeLength>
-X <OfficeLength>
-Y <OfficeLength>
[<CommonParameters>]#Parameter set:
RectangleRemove-OfficePdfContent
[-FillColor <OfficeColor>]
-Height <OfficeLength>
[-IgnorePermissionRestrictions]
[-Label <String>]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
-Page <Int32>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Width <OfficeLength>
-X <OfficeLength>
-Y <OfficeLength>
[<CommonParameters>]#Parameter set:
RectangleDirectoryRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Text <String[]>
[<CommonParameters>]#Parameter set:
TextLiteralPathRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Pattern <String[]>
[<CommonParameters>]#Parameter set:
PatternLiteralPathRemove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]#Parameter set:
AreaLiteralPathRemove-OfficePdfContent
[-FillColor <OfficeColor>]
-Height <OfficeLength>
[-IgnorePermissionRestrictions]
[-Label <String>]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
-Page <Int32>
[-PassThru]
[-Password <SecureString>]
-Width <OfficeLength>
-X <OfficeLength>
-Y <OfficeLength>
[<CommonParameters>]#Parameter set:
RectangleLiteralPathRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Text <String[]>
[<CommonParameters>]#Parameter set:
TextLiteralPathDirectoryRemove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Pattern <String[]>
[<CommonParameters>]#Parameter set:
PatternLiteralPathDirectoryRemove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]#Parameter set:
AreaLiteralPathDirectoryRemove-OfficePdfContent
[-FillColor <OfficeColor>]
-Height <OfficeLength>
[-IgnorePermissionRestrictions]
[-Label <String>]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
-Page <Int32>
[-PassThru]
[-Password <SecureString>]
-Width <OfficeLength>
-X <OfficeLength>
-Y <OfficeLength>
[<CommonParameters>]#Parameter set:
RectangleLiteralPathDirectoryExamples
Use the native OfficePdfContent command.
Remove-OfficePdfContent -Path .\Contracts\MSA-Contoso.pdf -OutputPath .\Contracts\MSA-Redacted.pdf -Text 'Contoso Ltd'Parameters
- -CaseSensitive SwitchParameter
- Replaces -MatchCase.
- -FillColor OfficeColor
- FillColor for this operation.
- -IgnorePermissionRestrictions SwitchParameter
- After successful authentication only; never bypasses a missing password.
- -LoadOptions PdfLoadOptions
- LoadOptions for this operation.
- -NoClobber SwitchParameter
- NoClobber for this operation.
- -OnlyPaintMatches SwitchParameter
- OnlyPaintMatches for this operation.
- -OutputPath String
- OutputPath for this operation.
- -PassThru SwitchParameter
- PassThru for this operation.
- -Password SecureString
- Argument transformation also accepts a plain string (with a warning) or a PSCredential (its password).
- -Path String[]
- Path for this operation.
- -Text String[]
- Text for this operation.
- -OutputDirectory String
- OutputDirectory for this operation.
- -Pattern String[]
- Bounded regular expressions matched with the same case policy as Get-OfficePdfRedactionPlan.
- -Area PdfRedactionArea[]
- Area for this operation.
- -Height OfficeLength
- Height for this operation.
- -Label String
- Label for this operation.
- -Page Int32
- 1-based.
- -Width OfficeLength
- Width for this operation.
- -X OfficeLength
- X for this operation.
- -Y OfficeLength
- Y for this operation.
- -LiteralPath String[]
- LiteralPath for this operation.
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.