Sample PDF file — free download
PDF test files for viewers, converters, text extraction and upload validation — a minimal valid document, a 500-page one, and deliberately damaged files whose header still looks perfectly correct.
6 ready-made PDF test files
| File | Size | What it catches | |
|---|---|---|---|
| empty-zero-pages.pdf | 430 bytes | Renderers and page-splitters that assume at least one page exists and divide by page count. | download |
| corrupt-xref.pdf | 720 bytes | Parsers that crash or hang instead of falling back to a full-file object scan. Most real-world "damaged PDF" reports look exactly like this. | download |
| valid-1page.pdf | 750 bytes | Your happy-path baseline. If this fails, the problem is your pipeline, not the file. | download |
| truncated.pdf | 1.4 KB | Upload handlers that accept a partial file because the magic bytes matched the first 5 bytes. Validate the trailer, not just the header. | download |
| no-text-layer.pdf | 1.7 KB | Text-extraction pipelines that silently return an empty string instead of flagging that OCR is required. Also an accessibility failure case: no reading order for screen readers. | download |
| valid-500pages.pdf | 258 KB | Viewers that render every page eagerly instead of lazily, thumbnail jobs that time out, and page-count parsers that stop at the first /Count. | download |
Every file is generated from source — no third-party copyright — and each has its own page with a published SHA-256 you can verify after download.
Questions
Where can I download a dummy PDF file for testing?
The 1-page valid PDF below is a minimal, genuinely valid document — ideal as an upload fixture.
How do I test PDF error handling?
Use the corrupt-xref and truncated PDFs. Both start with a valid %PDF- header, so extension checks and magic-number checks pass — only actually parsing them reveals the damage.
Do you have a PDF with no text layer?
Yes — the no-text-layer PDF renders visually but contains no extractable text, which is how scanned documents behave. Use it to test OCR fallbacks.