Documents
Convert PDF, Word, Excel and CSV files to Markdown and chunks.
webfold convert <document-file>
webfold pdf <file.pdf> [--chunk n]
webfold chunk <html|md|txt|pdf|url> [--size n] [--jsonl]
Structured document conversion (PDF, DOCX, XLSX, CSV) delegates to the Superdocuments converter. Legacy .xls uses a local Calamine adapter. The pdf command uses the in-process Superdocuments parser with an OCR fallback.
Know the limits
- The CLI expands bounded direct
/ObjStmmembers before parsing a PDF. That is not general cross-reference-stream resolution. - Some fixtures extract their text but still misdecode certain non-ASCII glyphs.
- The PDF adapter is used by the CLI PDF routes. It is not a PDF guarantee of the public
document::convert_pathlibrary API. - Run untrusted documents with restricted filesystem access. An opt-in Landlock sandbox exists for processing hostile files on Linux 5.13 and newer.
Per-format routes and limits are documented in the repository’s docs/STRUCTURED-CONVERSION.md.
Hosted API
POST /v1/documents/convert converts a base64 file to Markdown with the same engine, up to 25 MiB per request. Send filename (the extension picks the format) or set format. See the API reference and the OCR guide for scanned PDFs.