processAnnotations method

Future<bool> processAnnotations(
  1. String sourcePath,
  2. AnnotationType type,
  3. AnnotationProcessingMode mode,
  4. String destinationPath,
)

Processes the annotations of the document at sourcePath and writes the result to destinationPath, mirroring the legacy SDK's annotation processing.

type selects which annotation type to process (use AnnotationType.all for every annotation); mode chooses how — flatten, remove, embed, or print. The source document is opened, processed, and released internally, so no open document/view is required.

Backs Nutrient.processAnnotations. The default throws UnsupportedError; the Android and iOS adapters override it (Web has no equivalent and keeps throwing).

Implementation

Future<bool> processAnnotations(
  String sourcePath,
  AnnotationType type,
  AnnotationProcessingMode mode,
  String destinationPath,
) {
  throw UnsupportedError(
    'processAnnotations is not supported by this adapter.',
  );
}