API Reference

Cmdlet

ConvertTo-OfficePdfRedacted

Namespace PSWriteOffice
Inputs
System.String
Outputs
System.IO.FileInfo

Applies rectangle-based PDF redactions and writes a new PDF.

Remarks

Applies rectangle-based PDF redactions and writes a new PDF.

Examples

Authored help example

Apply a redaction rectangle.

PS>


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.

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

ConvertTo-OfficePdfRedacted [-FillColor <String>] -Height <Double> [-Label <String>] [-OnlyPaintMatches] -OutputPath <String> -PageNumber <Int32> [-Password <String>] -Path <String> -Width <Double> -X <Double> -Y <Double> [<CommonParameters>]
#
Parameter set: Rectangle

Parameters

FillColor String optionalposition: namedpipeline: False
Redaction fill color in #RRGGBB format. Defaults to black.
Height Double requiredposition: namedpipeline: False
Rectangle height in PDF points.
Label String optionalposition: namedpipeline: False
Optional redaction area label.
OnlyPaintMatches SwitchParameter optionalposition: namedpipeline: False
Paint only areas that match text or annotations in the redaction plan.
OutputPath String requiredposition: 1pipeline: False
Output PDF path.
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
Input PDF 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

System.IO.FileInfo

ConvertTo-OfficePdfRedacted -Area <PdfRedactionArea[]> [-FillColor <String>] [-OnlyPaintMatches] -OutputPath <String> [-Password <String>] -Path <String> [<CommonParameters>]
#
Parameter set: Area

Parameters

Area PdfRedactionArea[] requiredposition: namedpipeline: False
One or more pre-created OfficeIMO.Pdf redaction areas.
FillColor String optionalposition: namedpipeline: False
Redaction fill color in #RRGGBB format. Defaults to black.
OnlyPaintMatches SwitchParameter optionalposition: namedpipeline: False
Paint only areas that match text or annotations in the redaction plan.
OutputPath String requiredposition: 1pipeline: False
Output PDF path.
Password String optionalposition: namedpipeline: False
Password used to read a Standard password-encrypted PDF.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
Input PDF path.

Outputs

System.IO.FileInfo