Table of Contents

Interface IPdfRedactionService

Namespace
PdfEngine.Redaction
Assembly
PdfEngine.Abstractions.dll

Keeps a list of pending redactions and applies them, which removes the content under them.

public interface IPdfRedactionService

Methods

AddPendingRedactionAsync(IPdfDocument, RedactionArea, CancellationToken)

ValueTask AddPendingRedactionAsync(IPdfDocument document, RedactionArea redaction, CancellationToken cancellationToken = default)

Parameters

document IPdfDocument

An open document of this engine.

redaction RedactionArea

The area to redact.

cancellationToken CancellationToken

Cancels the operation.

Returns

ValueTask

ApplyRedactionsAsync(IPdfDocument, string, IReadOnlyList<RedactionArea>, CancellationToken)

Writes a copy of the document with the content under redactions removed.

ValueTask ApplyRedactionsAsync(IPdfDocument document, string targetPath, IReadOnlyList<RedactionArea> redactions, CancellationToken cancellationToken = default)

Parameters

document IPdfDocument

An open document of this engine.

targetPath string

The file to write.

redactions IReadOnlyList<RedactionArea>

The areas to redact.

cancellationToken CancellationToken

Cancels the operation.

Returns

ValueTask

GetPendingRedactionsAsync(IPdfDocument, CancellationToken)

Gets the redactions marked on the document but not applied yet.

ValueTask<IReadOnlyList<RedactionArea>> GetPendingRedactionsAsync(IPdfDocument document, CancellationToken cancellationToken = default)

Parameters

document IPdfDocument

An open document of this engine.

cancellationToken CancellationToken

Cancels the operation.

Returns

ValueTask<IReadOnlyList<RedactionArea>>