Supported formats¶
docgate detects formats from a path extension, or accepts an explicit format
argument. PDF paths and PDF bytes are supported. Other formats currently need a
file path; non-PDF byte streams are reserved for future stream adapters.
| Format | Logical pages | Extraction path | Extra install |
|---|---|---|---|
| PDF pages | Embedded text, then provider OCR/vision for pages without usable text | None | |
| DOCX | One document | Paragraphs and table cells | docgate[office] |
| XLSX | One worksheet | Cell values | docgate[office] |
| PPTX | One slide | Text-bearing shapes | docgate[office] |
| TXT, Markdown | One file | Native text | None |
| HTML, HTM | One file | Basic tag-stripped text | None |
For non-PDF formats, all extraction is local. need and selection still affect
which logical pages are returned, but docgate does not render or send Office,
text, or HTML documents to providers.
PDF rendering safety¶
When a PDF page has no usable text layer, docgate renders it as PNG. Rendering
is bounded by max_pixels (8,000,000 by default). If a requested image must be
reduced, the receipt includes a Clamp; inspect receipt.clamps if image
resolution is important to your use case.
Encrypted PDFs cannot be planned without a password and are not decrypted by docgate.