# ConvertTo-OfficePdfRedacted

Applies explicit or text-matched PDF redactions and writes a new PDF.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.String`

**Outputs**

`System.IO.FileInfo`

**Source**

[ConvertToOfficePdfRedactedCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/ConvertToOfficePdfRedactedCommand.cs#L23) 

Applies explicit or text-matched PDF redactions and writes a new PDF.

## Syntax

```
ConvertTo-OfficePdfRedacted
[-FillColor <String>]
-Height <Double>
[-IgnorePermissionRestrictions]
[-Label <String>]
[-OnlyPaintMatches]
[-OutputPath] <String>
-PageNumber <Int32>
[-Password <String>]
[-Path] <String>
-Width <Double>
-X <Double>
-Y <Double>
[<CommonParameters>]
```

[#](#method-convertto-officepdfredacted-string-double-switchparameter-string-switchparameter-string-int32-string-string-double-double-double)

Parameter set: `Rectangle`

```
ConvertTo-OfficePdfRedacted
-Area <PdfRedactionArea[]>
[-FillColor <String>]
[-IgnorePermissionRestrictions]
[-OnlyPaintMatches]
[-OutputPath] <String>
[-Password <String>]
[-Path] <String>
[<CommonParameters>]
```

[#](#method-convertto-officepdfredacted-pdfredactionarea-string-switchparameter-switchparameter-string-string-string)

Parameter set: `Area`

```
ConvertTo-OfficePdfRedacted
[-FillColor <String>]
[-IgnorePermissionRestrictions]
[-MatchCase]
[-OnlyPaintMatches]
[-OutputPath] <String>
[-Password <String>]
[-Path] <String>
-Text <String[]>
[<CommonParameters>]
```

[#](#method-convertto-officepdfredacted-string-switchparameter-switchparameter-switchparameter-string-string-string-string)

Parameter set: `Text`

## Examples

### Apply a redaction rectangle.

```powershell
ConvertTo-OfficePdfRedacted -Path .\Report.pdf -OutputPath .\Report-Redacted.pdf -PageNumber 1 -X 72 -Y 650 -Width 240 -Height 32
```

Removes matching text objects and annotations in the rectangle, then paints a redaction mark.

### Redact logical text blocks containing a value.

```powershell
ConvertTo-OfficePdfRedacted -Path .\Report.pdf -OutputPath .\Report-Redacted.pdf -Text 'Account number'
```

Finds matching logical text blocks, removes their content, and paints the derived areas.

## Parameters

**-FillColor String optional**

Redaction fill color. Named colors and hexadecimal values are accepted. Defaults to black.

**-Height Double requiredsets: Rectangle**

Rectangle height in PDF points.

**-IgnorePermissionRestrictions SwitchParameter optional**

After successful password authentication, explicitly ignore owner-imposed modification restrictions.

**-Label String optionalsets: Rectangle**

Optional redaction area label.

**-OnlyPaintMatches SwitchParameter optional**

Paint only areas that match text or annotations in the redaction plan.

**-OutputPath String requiredposition: 1**

Output PDF path.

**-PageNumber Int32 requiredsets: Rectangle**

One-based page number for the redaction rectangle.

**-Password String optional**

Password used to read a Standard password-encrypted PDF.

**-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath**

Input PDF path.

**-Width Double requiredsets: Rectangle**

Rectangle width in PDF points.

**-X Double requiredsets: Rectangle**

Left coordinate in PDF points.

**-Y Double requiredsets: Rectangle**

Bottom coordinate in PDF points.

**-Area PdfRedactionArea[] requiredsets: Area**

One or more pre-created OfficeIMO.Pdf redaction areas.

**-MatchCase SwitchParameter optionalsets: Text**

Use case-sensitive literal text matching.

**-Text String[] requiredsets: Text**

Literal text used to derive redaction areas from matching logical text blocks.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:17375B51C8B6476F0DBD9CB9F00759F34F80559F8E76F30A123AE5DD7888F158 -->
