close method
Closes the document and releases the native PDFium handle.
Safe to call more than once — subsequent calls are no-ops. After close returns, all other methods throw StateError.
Any active extractPlainText stream is terminated: the stream stops emitting events and the subscription is silently cancelled. Callers do not need to cancel streams manually before calling close.
Implementation
Future<void> close() => _impl.close();