pub fn clean(input: &Path, out_dir: &Path) -> Result<SafeBundle, DocumentError>Available on crate feature
ocr-tesseract only.Expand description
Top-level entry point: ingest one document, write a SafeBundle to disk.
input must be a regular file with extension .png, .jpg, .jpeg, or
.pdf. out_dir is created if missing and populated with three files
(see module docs).
§Errors
Returns DocumentError for any failure in the OCR → redact → write
chain. Fail-closed: every error variant carries enough context to
diagnose without inspecting partial bundle state.