PdfExtractionException class
Thrown when a PDF operation fails.
The error field provides the reason for the failure. Callers should handle PdfError.passwordRequired and PdfError.invalidDocument separately to give users actionable error messages.
Example:
try {
final doc = await PdfDocument.fromBytes(bytes);
} on PdfExtractionException catch (e) {
if (e.error == PdfError.passwordRequired) {
// prompt user for a password
} else {
// report a corrupt or invalid file
}
}
- Implemented types
Constructors
- PdfExtractionException(PdfError error)
-
Creates a PdfExtractionException with the given
error.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited