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.

↓ Download document-parser-pack.zip15 files · 33.2 KB zipped

SHA-256 b9b9a8ca0a0f6c2e677c733e3b71fa40d178565209aa3e37d5f57312ebb1ed66

What is inside

FileFormatSizeExpected result
valid-1page.pdfPDF750 bytesOpens. The minimal valid control.
valid-500pages.pdfPDF258 KBOpens without loading every page into memory at once.
no-text-layer.pdfPDF1.7 KBRenders, but text extraction returns nothing. OCR fallback should trigger.
corrupt-xref.pdfPDF720 bytesRejected at parse. The %PDF- header is perfectly valid.
truncated.pdfPDF1.4 KBRejected. Header intact, body cut short.
document.docxDOCX1.1 KBOpens in Word, LibreOffice and python-docx.
spreadsheet.xlsxXLSX1.7 KBOpens, and the live formula is parsed.
legacy-workbook.xlsXLS3.5 KBOpens. Note it is an OLE2 file, not a ZIP: nothing about .xlsx handling applies.
presentation.pptxPPTX3.7 KBOpens as a real OOXML presentation.
macro-enabled.xlsmXLSM1.8 KBBlocked or allowed deliberately, not by accident.
document.odtODT814 bytesOpenDocument, with the mimetype entry stored first and uncompressed.
spreadsheet.odsODS840 bytesSame, with a table to import.
corrupt-missing-content-types.docxDOCX577 bytesRejected: a valid ZIP that is not a valid DOCX.
valid.epubEPUB2.1 KBOpens in a reader.
broken-container.epubEPUB1.5 KBRejected: the mimetype entry is not first and uncompressed.
Also in the archive: a README.md repeating this table with full digests, a manifest.json for scripting, and a SHA256SUMS you can check with 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