Common errors, their causes, and how to fix them.
Every error the SDK returns carries a stable code and a link to this section. The code does not change between releases, so it is safe to branch on.
Error::Io
Underlying I/O operation failed.
Check that the file path is accessible and the process has read/write permissions. Inspect `source` for the underlying OS error.
Error::FileNotFound
File not found at the given path.
Verify the path exists before calling. Use `Path::exists()` or handle this variant to prompt the user for the correct path.
Error::InvalidPdf
PDF is structurally invalid.
Ensure the bytes are a complete, undamaged PDF. Check `byte_offset` for the failure site. Re-download or re-export the file if corrupt.
Error::UnsupportedPdfVersion
PDF version is newer than the supported maximum.
The PDF version header exceeds what this build supports. Upgrade to a newer PDFluent release, or pre-process the file with a downgrader.
Error::PdfaValidationFailed
PDF/A validation failed against the requested profile.
Inspect `violations` for specific rule identifiers. Use `OpenOptions::convert_to_pdfa()` to auto-repair, or fix the source document before validation.
Error::DecryptionFailed
Decryption failed — wrong password or unsupported algorithm.
Supply the correct password via `OpenOptions::password()`. Check `reason` to distinguish wrong-password from unsupported-algorithm cases.
Error::InvalidSignature
A digital signature is invalid.
The signature in `field` failed verification. Check `reason` for details. Do not trust the document content if integrity is required.
Error::InvalidLicense
License key is malformed or expired.
Re-issue the license key or call `activate_license()` again with a valid key. Check `reason` for the specific parse failure.
Error::LicenseExpired
License key is well-formed and signed, but its `expires_at` is in the past. Surfaced by the signed-payload pathway only — mock `tier:X` keys have no expiry and never produce this variant.
Renew the license — the `expires_at` unix timestamp in the payload is in the past. Visit https://pdfluent.com/pricing or contact sales for a refreshed key.
Error::LicenseInvalidSignature
License key is structurally a signed JSON payload but the Ed25519 signature does not verify against the configured public key. Indicates either a tampered payload or a payload signed by a different pr
The signed payload does not verify against the configured public key. Either the payload was tampered, or it was signed with a different private key than the verifier expects. Re-download the license file from PDFluent and try again; if the issue persists, con
Error::LicenseRateLimited
A license-enforced rate or usage limit was exceeded at runtime. Returned by `LicenseGuard::record_*` calls during operation; not an activation-time error. Carries the metered resource, used value, and
A licence-enforced rate or usage cap was reached. Inspect `resource`, `used`, and `limit` to identify which cap fired. Either upgrade the tier or wait for the metering window to reset.
Error::TextEditFailed
A text-edit transaction failed (see [`crate::text_edit`] for the typed per-edit errors this message summarizes).
TBD
Error::UnsupportedOnWasm
Operation is not supported in WebAssembly builds.
This operation (`operation`) cannot run in a WASM32 environment. Use the server-side API or guard with `#[cfg(not(target_arch = "wasm32"))]`.
Error::MissingDependency
A native dependency is required but not installed or discoverable.
Install the missing native library (`dep`) following `install_hint`. Ensure the library is on `LD_LIBRARY_PATH` / `DYLD_LIBRARY_PATH`.
Error::MemoryBudgetExceeded
Memory budget set via [`crate::OpenOptions::strict_memory_limit`] exceeded.
Raise the memory limit via `OpenOptions::strict_memory_limit()`, or process the document in smaller chunks.
Error::ResourceLimitExceeded
A configured [`ProcessingLimits`](pdf_engine::ProcessingLimits) resource cap was exceeded while loading or processing the document. Returned when the caller has set a limits object via [`crate::OpenOp
Inspect `kind` to identify which cap fired, then raise the corresponding `ProcessingLimits` field. For untrusted input, keep limits tight and reject oversized files at the ingestion layer.
Error::Unsupported
The requested operation is not supported for this document or in this build.
Read the message: it names what was asked for. Either the document lacks the structure the operation needs, or the capability is not part of this build.
Error::Internal
Internal safety-net. Should never fire under normal operation.
This should never occur under normal operation. File a bug report at https://pdfluent.com/support including `message` and `crate_version`.