kcode-doc-extraction 0.1.0

Local PDF, DOCX, spreadsheet, and plain-text extraction
Documentation
# kcode-doc-extraction Agent Integration Reference

`kcode-doc-extraction` is a standalone synchronous Rust 2024 library for local
document-to-text conversion. It uses no remote API.

```rust
use kcode_doc_extraction::{DocumentExtractor, DocumentInput, Result};

fn extract(bytes: Vec<u8>) -> Result<String> {
    Ok(DocumentExtractor::default()
        .extract(DocumentInput {
            file_name: "report.pdf".into(),
            content_type: "application/pdf".into(),
            data: bytes,
        })?
        .text)
}
```

Supported formats are searchable PDF, DOCX, XLSX, XLS, XLSB, ODS, CSV, TSV,
plain text, Markdown, JSON, YAML, and XML. PDFs are not OCRed. DOCX extraction
reads the main document XML. Workbooks are rendered sheet-by-sheet as tabular
text. Text-family inputs use lossy UTF-8 decoding.

Defaults accept at most 20 MiB and return at most one million Unicode
characters. Newlines, NULs, trailing whitespace, and repeated blank lines are
normalized. The library contains no multipart parser, HTTP status mapping,
filesystem access, persistence, or async runtime. Async servers should run it
on a blocking worker. The root `Cargo.toml` version is canonical and no
`Version.txt` is required.