Document Parser Pack
Six of these are valid and should open everywhere. Four are broken in ways that keep their headers intact, which is the case most pipelines get wrong: they accept the upload, then fail in a background job hours later with no user left to tell.
SHA-256 b9b9a8ca0a0f6c2e677c733e3b71fa40d178565209aa3e37d5f57312ebb1ed66
What is inside
| File | Format | Size | Expected result |
|---|---|---|---|
| valid-1page.pdf | 750 bytes | Opens. The minimal valid control. | |
| valid-500pages.pdf | 258 KB | Opens without loading every page into memory at once. | |
| no-text-layer.pdf | 1.7 KB | Renders, but text extraction returns nothing. OCR fallback should trigger. | |
| corrupt-xref.pdf | 720 bytes | Rejected at parse. The %PDF- header is perfectly valid. | |
| truncated.pdf | 1.4 KB | Rejected. Header intact, body cut short. | |
| document.docx | DOCX | 1.1 KB | Opens in Word, LibreOffice and python-docx. |
| spreadsheet.xlsx | XLSX | 1.7 KB | Opens, and the live formula is parsed. |
| legacy-workbook.xls | XLS | 3.5 KB | Opens. Note it is an OLE2 file, not a ZIP: nothing about .xlsx handling applies. |
| presentation.pptx | PPTX | 3.7 KB | Opens as a real OOXML presentation. |
| macro-enabled.xlsm | XLSM | 1.8 KB | Blocked or allowed deliberately, not by accident. |
| document.odt | ODT | 814 bytes | OpenDocument, with the mimetype entry stored first and uncompressed. |
| spreadsheet.ods | ODS | 840 bytes | Same, with a table to import. |
| corrupt-missing-content-types.docx | DOCX | 577 bytes | Rejected: a valid ZIP that is not a valid DOCX. |
| valid.epub | EPUB | 2.1 KB | Opens in a reader. |
| broken-container.epub | EPUB | 1.5 KB | Rejected: the mimetype entry is not first and uncompressed. |
sha256sum -c. Every file is generated from source, carries no third-party copyright, and is free to redistribute.Questions
What is the difference between .xls and .xlsx?
Nothing structural. An .xlsx is a ZIP of XML parts beginning with the bytes PK; an .xls is an OLE2 compound document beginning D0 CF 11 E0. A library that reads one will not read the other. Both are in this pack so you can prove your code handles each.
How do I test document error handling?
Use the four damaged files. Each keeps a valid header, so extension checks and magic-number checks both pass and only a real parse reveals the problem. If your pipeline accepts them, it is deferring the failure to somewhere it cannot be reported.
Other packs
Upload Torture Test Pack · Filename Compatibility Pack · Encoding and Unicode Pack · Archive and ZIP Security Pack · Image Pipeline Pack · Structured Data Pack · Email Parser Pack