Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Remove-OfficePdfContent

Module
PSWriteOffice
Inputs
System.String[]
Outputs
System.Object

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: Text
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Text <String[]>
[<CommonParameters>]
#
Parameter set: TextDirectory
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Pattern <String[]>
[<CommonParameters>]
#
Parameter set: Pattern
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Pattern <String[]>
[<CommonParameters>]
#
Parameter set: PatternDirectory
Remove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]
#
Parameter set: Area
Remove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[<CommonParameters>]
#
Parameter set: AreaDirectory
Remove-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: Rectangle
Remove-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: RectangleDirectory
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Text <String[]>
[<CommonParameters>]
#
Parameter set: TextLiteralPath
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Pattern <String[]>
[<CommonParameters>]
#
Parameter set: PatternLiteralPath
Remove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]
#
Parameter set: AreaLiteralPath
Remove-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: RectangleLiteralPath
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Text <String[]>
[<CommonParameters>]
#
Parameter set: TextLiteralPathDirectory
Remove-OfficePdfContent
[-CaseSensitive]
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
[-OnlyPaintMatches]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Pattern <String[]>
[<CommonParameters>]
#
Parameter set: PatternLiteralPathDirectory
Remove-OfficePdfContent
-Area <PdfRedactionArea[]>
[-FillColor <OfficeColor>]
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-NoClobber]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[<CommonParameters>]
#
Parameter set: AreaLiteralPathDirectory
Remove-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: RectangleLiteralPathDirectory

Examples

Use the native OfficePdfContent command.

Remove-OfficePdfContent -Path .\Contracts\MSA-Contoso.pdf -OutputPath .\Contracts\MSA-Redacted.pdf -Text 'Contoso Ltd'

Parameters

-CaseSensitive SwitchParameter optionalsets: Text, TextDirectory, Pattern, PatternDirectory, TextLiteralPath, PatternLiteralPath, TextLiteralPathDirectory, PatternLiteralPathDirectory
Replaces -MatchCase.
-FillColor OfficeColor optional
FillColor for this operation.
-IgnorePermissionRestrictions SwitchParameter optional
After successful authentication only; never bypasses a missing password.
-LoadOptions PdfLoadOptions optional
LoadOptions for this operation.
-NoClobber SwitchParameter optional
NoClobber for this operation.
-OnlyPaintMatches SwitchParameter optionalsets: Text, TextDirectory, Pattern, PatternDirectory, TextLiteralPath, PatternLiteralPath, TextLiteralPathDirectory, PatternLiteralPathDirectory
OnlyPaintMatches for this operation.
-OutputPath String requiredsets: Text, Pattern, Area, Rectangle, TextLiteralPath, PatternLiteralPath, AreaLiteralPath, RectangleLiteralPath
OutputPath for this operation.
-PassThru SwitchParameter optional
PassThru for this operation.
-Password SecureString optional
Argument transformation also accepts a plain string (with a warning) or a PSCredential (its password).
-Path String[] requiredposition: 0sets: Text, TextDirectory, Pattern, PatternDirectory, Area, AreaDirectory, Rectangle, RectangleDirectory
Path for this operation.
-Text String[] requiredsets: Text, TextDirectory, TextLiteralPath, TextLiteralPathDirectory
Text for this operation.
-OutputDirectory String requiredsets: TextDirectory, PatternDirectory, AreaDirectory, RectangleDirectory, TextLiteralPathDirectory, PatternLiteralPathDirectory, AreaLiteralPathDirectory, RectangleLiteralPathDirectory
OutputDirectory for this operation.
-Pattern String[] requiredsets: Pattern, PatternDirectory, PatternLiteralPath, PatternLiteralPathDirectory
Bounded regular expressions matched with the same case policy as Get-OfficePdfRedactionPlan.
-Area PdfRedactionArea[] requiredsets: Area, AreaDirectory, AreaLiteralPath, AreaLiteralPathDirectory
Area for this operation.
-Height OfficeLength requiredsets: Rectangle, RectangleDirectory, RectangleLiteralPath, RectangleLiteralPathDirectory
Height for this operation.
-Label String optionalsets: Rectangle, RectangleDirectory, RectangleLiteralPath, RectangleLiteralPathDirectory
Label for this operation.
-Page Int32 requiredsets: Rectangle, RectangleDirectory, RectangleLiteralPath, RectangleLiteralPathDirectory
1-based.
-Width OfficeLength requiredsets: Rectangle, RectangleDirectory, RectangleLiteralPath, RectangleLiteralPathDirectory
Width for this operation.
-X OfficeLength requiredsets: Rectangle, RectangleDirectory, RectangleLiteralPath, RectangleLiteralPathDirectory
X for this operation.
-Y OfficeLength requiredsets: Rectangle, RectangleDirectory, RectangleLiteralPath, RectangleLiteralPathDirectory
Y for this operation.
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: TextLiteralPath, PatternLiteralPath, AreaLiteralPath, RectangleLiteralPath, TextLiteralPathDirectory, PatternLiteralPathDirectory, AreaLiteralPathDirectory, RectangleLiteralPathDirectory
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.