Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Get-OfficePdfRedactionPlan

Namespace PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Pdf.PdfRedactionPlan

Previews explicit or text-matched PDF redaction areas before content is removed.

Remarks

This command reports redaction impact only. It does not remove or rewrite PDF content.

Examples

Authored help example

Preview a redaction rectangle.

PS>


Get-OfficePdfRedactionPlan -Path .\Report.pdf -PageNumber 1 -X 72 -Y 650 -Width 240 -Height 32
        

Returns line-level text blocks and annotations that intersect the rectangle.

Find content to redact by text.

PS>


Get-OfficePdfRedactionPlan -Path .\Report.pdf -Text 'Account number'
        

Derives reviewable redaction areas from logical text blocks containing the supplied text.

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

Get-OfficePdfRedactionPlan -Height <Double> [-IgnorePermissionRestrictions] [-Label <String>] -PageNumber <Int32> [-Password <String>] -Path <String> -Width <Double> -X <Double> -Y <Double> [<CommonParameters>]
#
Parameter set: Rectangle

Parameters

Height Double requiredposition: namedpipeline: False
Rectangle height in PDF points.
IgnorePermissionRestrictions SwitchParameter optionalposition: namedpipeline: False
After successful password authentication, explicitly ignore owner-imposed extraction restrictions.
Label String optionalposition: namedpipeline: False
Optional redaction area label.
PageNumber Int32 requiredposition: namedpipeline: False
One-based page number for the redaction rectangle.
Password String optionalposition: namedpipeline: False
Password used to read a Standard password-encrypted PDF.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
PDF file path.
Width Double requiredposition: namedpipeline: False
Rectangle width in PDF points.
X Double requiredposition: namedpipeline: False
Left coordinate in PDF points.
Y Double requiredposition: namedpipeline: False
Bottom coordinate in PDF points.

Outputs

OfficeIMO.Pdf.PdfRedactionPlan

Get-OfficePdfRedactionPlan -Area <PdfRedactionArea[]> [-IgnorePermissionRestrictions] [-Password <String>] -Path <String> [<CommonParameters>]
#
Parameter set: Area

Parameters

Area PdfRedactionArea[] requiredposition: namedpipeline: False
One or more pre-created OfficeIMO.Pdf redaction areas.
IgnorePermissionRestrictions SwitchParameter optionalposition: namedpipeline: False
After successful password authentication, explicitly ignore owner-imposed extraction restrictions.
Password String optionalposition: namedpipeline: False
Password used to read a Standard password-encrypted PDF.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
PDF file path.

Outputs

OfficeIMO.Pdf.PdfRedactionPlan

Get-OfficePdfRedactionPlan [-IgnorePermissionRestrictions] [-MatchCase] [-Password <String>] -Path <String> -Text <String[]> [<CommonParameters>]
#
Parameter set: Text

Parameters

IgnorePermissionRestrictions SwitchParameter optionalposition: namedpipeline: False
After successful password authentication, explicitly ignore owner-imposed extraction restrictions.
MatchCase SwitchParameter optionalposition: namedpipeline: False
Use case-sensitive literal text matching.
Password String optionalposition: namedpipeline: False
Password used to read a Standard password-encrypted PDF.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
PDF file path.
Text String[] requiredposition: namedpipeline: False
Literal text used to derive redaction areas from matching logical text blocks.

Outputs

OfficeIMO.Pdf.PdfRedactionPlan