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
documentIPdfDocumentAn open document of this engine.
pageNumberintThe page number, starting at 1.
cancellationTokenCancellationTokenCancels the operation.
Returns
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
documentIPdfDocumentAn open document of this engine.
targetPathstringThe file to write.
annotationsIReadOnlyList<AnnotationModel>The annotations to add.
modeAnnotationSaveModeKeep the annotations editable, or draw them into the page content.
cancellationTokenCancellationTokenCancels the operation.