Table of Contents

Interface IPdfAnnotationService

Namespace
PdfEngine.Annotations
Assembly
PdfEngine.Abstractions.dll

Reads the annotations of a page and writes a document with changed annotations.

public interface IPdfAnnotationService

Methods

LoadAnnotationsAsync(IPdfDocument, int, CancellationToken)

Gets the annotations of a page.

ValueTask<IReadOnlyList<AnnotationModel>> LoadAnnotationsAsync(IPdfDocument document, int pageNumber, CancellationToken cancellationToken = default)

Parameters

document IPdfDocument

An open document of this engine.

pageNumber int

The page number, starting at 1.

cancellationToken CancellationToken

Cancels the operation.

Returns

ValueTask<IReadOnlyList<AnnotationModel>>

SaveAnnotatedDocumentAsync(IPdfDocument, string, IReadOnlyList<AnnotationModel>, AnnotationSaveMode, CancellationToken)

Writes a copy of document with annotations added.

ValueTask SaveAnnotatedDocumentAsync(IPdfDocument document, string targetPath, IReadOnlyList<AnnotationModel> annotations, AnnotationSaveMode mode, CancellationToken cancellationToken = default)

Parameters

document IPdfDocument

An open document of this engine.

targetPath string

The file to write.

annotations IReadOnlyList<AnnotationModel>

The annotations to add.

mode AnnotationSaveMode

Keep the annotations editable, or draw them into the page content.

cancellationToken CancellationToken

Cancels the operation.

Returns

ValueTask