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

FileSizeWhat it catchesDownload
empty-zero-pages.pdf430 bytesRenderers and page-splitters that assume at least one page exists and divide by page count.download
corrupt-xref.pdf720 bytesParsers 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.pdf750 bytesYour happy-path baseline. If this fails, the problem is your pipeline, not the file.download
truncated.pdf1.4 KBUpload 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.pdf1.5 KBRetrieval 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.pdf1.6 KBExtraction 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.pdf1.7 KBText-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.pdf2.6 KBPage-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.pdf258 KBViewers 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.

Other formats

Sample CSV fileSample JSON fileSample ZIP fileSample PNG fileSample image filesSample XLS and XLSX (Excel) filesSample DOCX (Word) fileSample TXT and encoding test files