pdftoolskit.org
PDF (Portable Document Format) utilities, in the browser
Say hi →

Sample PDF Files for Testing

22 files · CC0 / public domain · no signup · no email wall

Every sample PDF here is machine-generated, contains no real data, and is dedicated to the public domain under CC0 — download any of them, commit them to your test suite, ship them in your repo, no attribution needed. Each family below has its own page with details on what the file contains and what it's useful for testing.

Blank PDFs

Truly empty pages for placeholder and baseline tests — details and more on the blank samples page.

Multi-page PDFs

Known page counts for split / extract / reorder tests — details on the multi-page samples page.

Exact file sizes

For upload-limit and performance testing — each file lands at or just under its advertised size, never over. Details on the large-files page.

Forms

Fillable AcroForm fields, empty and pre-filled — details on the form samples page.

Password-protected

Passwords are documented, not a puzzle: open password is test123details on the password samples page.

Special cases

Why these files exist

Most "sample PDF" downloads online are either someone's scanned homework, an email-gated marketing asset, or a file with an unclear license you probably shouldn't redistribute in a public repo. These are none of that: every file is generated by an open-source script (pdf-lib, Node.js), so you can see exactly how each one was made, regenerate them yourself, or request a variant. They're also the same files we use to test the tools on this site.

A good test matrix needs the boring shapes — one page, many pages, nothing on the page — and the awkward ones: a file that demands a password, a file whose text is pixels, a file that's simply broken. Each family page explains which failure modes the file is designed to surface.

FAQ

Can I use these commercially / in my company's test suite?

Yes. CC0 means no rights reserved: use, copy, modify, redistribute, ship in commercial products, no attribution required. There is no real data in any file to leak.

Can I hotlink the files directly?

You can (https://pdftoolskit.org/samples/<name>.pdf), but for CI or anything that fetches repeatedly, please vendor the file into your repo instead — it's CC0 precisely so you can.

How were the files generated?

With a Node.js script built on pdf-lib — the exact generator is public at tinytoolkit-org/pdf-sample-files, including the seeded PRNG used for the size-padding bytes, so byte-identical regeneration is possible.

Are the files safe? PDFs can carry scripts.

None of these contain JavaScript, launch actions, or external references. The "corrupted" sample is truncated, not malicious — it just ends mid-file. You can verify any of them in the metadata inspector.

I need a variant you don't have.

Open an issue on the GitHub repo or email [email protected] — if it's generatable with pdf-lib, it's usually a ten-line addition.