File formats
Which formats each operation accepts and how Papyrus detects them
Papyrus detects the format of every document from its content, then checks it against what the operation accepts. This page lists both.
By operation
| Format | Extensions | Markdown | Markdown with OCR | Render and thumbnail |
|---|---|---|---|---|
.pdf | yes, text layer only | every page | yes | |
| Word | .docx, .doc, .rtf | yes | every page | yes, through LibreOffice |
| PowerPoint | .pptx, .ppt | yes, slide text, tables and notes | every slide, without notes | yes, through LibreOffice |
| Excel | .xlsx, .xls | yes, one table per sheet | as text | yes, through LibreOffice |
| OpenDocument | .odt, .odp, .ods | yes | every page; .ods as text | yes, through LibreOffice |
| Outlook | .msg | yes, headers and body | as text | no |
| HTML | .html, .htm | yes | as text | yes; thumbnails are browser captures |
| EPUB | .epub | yes | as text | no |
| CSV and TSV | .csv, .tsv | yes, as a table | as text | no |
| Jupyter | .ipynb | yes | as text | no |
| RSS and Atom | .rss, .atom, .xml | yes | as text | no |
| JSON | .json, .jsonl | yes, passed through | as text | no |
| ZIP | .zip | yes, every entry converted | as text | no |
| Text and Markdown | .txt, .md, … | yes, passed through | as text | no |
| Code and config | .py, .ts, .go, .sql, .yaml, … | yes, as one fenced block | as text | no |
| Images | .png, .jpg, .webp, .gif, .bmp, .tiff, .avif | no | yes; every frame of a TIFF, the first frame of others | yes |
"As text" means that OCR has no effect on the format: auto and ocr extract it as text mode does, and options.readMode in the response says so.
Screenshot takes http(s):// URLs only and captures whatever the browser shows.
A format an operation does not accept fails with 415 unsupported_format before conversion starts. A file that is corrupt or encrypted usually fails with the same code, once Papyrus tries to open it.
What to expect per format
- Scanned PDFs have no text layer. The default
readMode: autoreads their page images with a vision model when the server has one configured; without one they return little or no text. - Legacy and OpenDocument files (
.doc,.ppt,.rtf,.odt,.odp,.ods) are converted with LibreOffice before Markdown extraction, which adds time to every request. - Office files and HTML in render and thumbnail,
.docx,.pptxand.xlsxincluded, are exported by LibreOffice one page at a time, sosource.pageCountis not reported. HTML thumbnails are the exception: they are browser captures. - HTML keeps headings, lists, links and tables. Site navigation and footers come through as text, as on the page.
- Animated and multi-page images (GIF, TIFF, animated WebP) render one frame per request, chosen with
page. OCR reads every frame of a TIFF and the first frame of the others.
How detection works
Papyrus identifies the content with Magika, a file type model, and uses the extension only to refine generic results. A PDF named report.docx is processed as a PDF; a .csv file is processed as CSV even though its content is plain text.
source reports the result:
| Field | Example | Meaning |
|---|---|---|
mimeType | application/pdf | MIME type of the detected format |
extension | pdf | Canonical extension, without the dot |
label | pdf | Format label; for code, the language (python, sql) |
group | document | Family: document, spreadsheet, presentation, email, archive, markup, data, code, text, image or unknown |
Use group to route documents in your own pipeline, and label when you need the exact format.
Check a file before processing
Inspect returns these fields and checks the name against the content, without processing the document.