DocumentParser class
Utility class for parsing documents (PDF, DOCX, etc.).
Wraps the low-level Rust document parser functions.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isOcrRequiredPdfExtractionError(
Object error) → bool - Returns true when a PDF extraction error indicates a scanned/image-only document — the kind OCR can recover.
-
parse(
List< int> bytes) → Future<String> - Auto-detect document type and extract text.
-
parseDocx(
List< int> bytes) → Future<String> - Extract text from DOCX bytes.
-
parsePdf(
List< int> bytes) → Future<String> - Extract text from PDF bytes.
-
userMessageForExtractionError(
Object error) → String - Convert known extraction failures into user-facing copy.
Constants
- scannedPdfOcrRequiredMessage → const String
- User-facing message for PDFs that contain no extractable text.