Sample PDF file: free download
What is a PDF file?
PDF (Portable Document Format) is a fixed-layout document format standardised as ISO 32000. A file starts with %PDF- and a version, holds numbered objects for pages, fonts and images, and usually ends with a cross-reference table giving each object's byte offset, then %%EOF.
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.
9 ready-made PDF test files
| File | Size | What it catches | Download |
|---|---|---|---|
| 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 |
| k2-specification.pdf | 1.5 KB | Retrieval returns the spec line (50 degrees C) without the footnote (40 degrees C for older serials), especially where small type or page furniture is filtered out. | download |
| product-sheet-two-column.pdf | 1.6 KB | Extraction that follows content stream order (pdftotext -raw, for one) interleaves the warranty and returns sentences line by line. Layout-aware extraction (pdftotext in its default mode) keeps them apart. | 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 |
| staff-handbook.pdf | 2.6 KB | Page-level chunking separates "an on-call allowance of" from "EUR 42 per weekend", with the page footer and next page header in between. Neither chunk answers the question on its own. | 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.