Document Formats
Purple8 DocIntel (v0.12.5) natively parses 70+ document formats across 6 categories — no pre-conversion required. Format detection uses file extension first, with magic-byte fallback for ambiguous or missing extensions.
Office & Productivity
12 formats across 5 parsers.
| Format | Extension(s) | Notes |
|---|---|---|
.pdf | Text extraction + OCR fallback for scanned pages | |
| Word | .docx, .doc, .odt | Paragraph, heading, table structure preserved |
| Excel | .xlsx, .xls, .ods | All sheets; cell values + types; tables extracted as markdown |
| PowerPoint | .pptx, .ppt, .odp | Slide text, notes, shape labels |
| RTF | .rtf | Rich text formatting stripped to plain |
| EPUB | .epub | Spine chapters extracted as ordered pages |
Web & Text
12 formats — HTML, plain text, email, and structured data.
| Format | Extension(s) | Notes |
|---|---|---|
| HTML | .html, .htm | Tags stripped; structure preserved via headings |
| Plain text | .txt, .md, .markdown, .rst | Decoded UTF-8, latin-1 fallback |
.eml, .msg | Headers + body; attachments enumerated | |
| CSV / TSV | .csv, .tsv | Rendered as pipe-delimited markdown tables |
| JSON | .json | Pretty-printed as structured text |
| XML | .xml | Tags preserved as structured context |
Images (OCR)
7 formats via pluggable OCR backends.
| Format | Extension(s) | OCR engines |
|---|---|---|
| Raster images | .png, .jpg, .jpeg, .tiff, .bmp, .webp | Tesseract · Azure Document Intelligence · Google Cloud Vision · AWS Textract |
| Sketch / whiteboard | .sketch | GPT-5 vision · Azure AI Vision 4.0 · Google Cloud Vision |
Images are processed through the configured OCR engine. For hand-drawn sketches and whiteboard photos, the vision engine provides semantic understanding beyond raw OCR.
CAD & BIM
11 formats across 3 parsers (CAD, STEP/mesh, BIM).
| Format | Extension(s) | Extracted content |
|---|---|---|
| IFC | .ifc, .ifczip | Project, site, building, storeys, spaces, IfcElements, materials, property sets, quantities, type objects |
| DXF | .dxf | Layers, entities, blocks, dimensions, text |
| DWG | .dwg | Via LibreDWG conversion to DXF |
| STEP | .step, .stp | Assembly tree, part names, B-rep metadata |
| STL | .stl | Triangle count, bounding box, part name |
| OBJ | .obj | Mesh groups, material references |
| GLTF / GLB | .gltf, .glb | Scene hierarchy, mesh names, materials |
| G-code | .gcode | Tool paths, layer count, estimated print time |
Code & Config
12 formats — all decoded as plain text with language metadata attached.
| Format | Extension(s) |
|---|---|
| Python | .py |
| JavaScript | .js |
| TypeScript | .ts |
| CSS | .css |
| SQL | .sql |
| Shell | .sh |
| Environment / dotenv | .env |
| YAML | .yaml, .yml |
| TOML | .toml |
| INI / config | .ini, .cfg |
P8G routing: All 12 code/config formats are classified via the rule-based fast path (confidence 1.0) and map to
DocumentCategory.CODE. Purple8 Graph receivesdoc_type: "code",chunking_hint: "syntactic", andsuggested_embedding_model: "voyage-code-3"inEmitPayload.metadata.
SAP
2 formats via a dedicated SAP parser.
| Format | Extension(s) | Notes |
|---|---|---|
| IDoc | .idoc | Fixed-width 1000-byte record format; segment tree reconstructed |
| ABAP source | .abap | Extracted as plain text with structure markers |
Table extraction
Tables embedded in PDF, DOCX, and XLSX documents are not flattened into text. They are converted to markdown and injected as dedicated LLM context windows with header preservation.
Read more about table extraction →
Adding a custom parser
DocIntel uses a plugin architecture for parsers. See src/purple8_docintel/parsers/base.py for the BaseParser interface. Each parser implements:
supported_formats()— list ofDocumentFormatenumsparse(raw_bytes, metadata) → ParsedDocument
To add a new format, create a parser class and register it in parsers/__init__.py.