Download 3 MB PDF file for testing

Open the single page and check document-upload behavior. The preset is 3 MiB (3,145,728 bytes); choose MB for decimal megabytes.

3,145,728 bytes · built in your browser, nothing uploaded
3,145,728 bytes
3 MiB · PDF · 772 B
Exact size

1 MB = 1,000,000 B · 1 MiB = 1,048,576 B

Advanced: test an upload limit

Enter the byte limit above, then choose one byte below, the exact limit or one byte above. Each choice uses the same base: 3,145,728 B. Generate and download each file to test your endpoint.

Where a 3 MB PDF comes up

  • Verifying that a Django view still works when an upload is written to a temporary file instead of kept in RAM.
  • Showing what a PHP form does when a document exceeds the stock 2M per-file setting by a clear margin.
  • Load-testing form endpoints with a realistic multi-page-scan sized document.

Limits it lands on

  • Django switches from MemoryFileUploadHandler to TemporaryFileUploadHandler above 2.5 MB, so this PDF exercises the on-disk path.
  • PHP rejects it on default settings, since 3 MB is above upload_max_filesize = 2M.

What is inside the file

The padding stream here is 3,145,008 bytes; everything a viewer actually renders fits in the first 720 bytes of the file.

The trailer and startxref values are recalculated for the exact length, so strict parsers such as pypdf read it cleanly.

Questions

What happens in Django with a file this size?

It is streamed to a temporary file on disk (TemporaryUploadedFile) instead of being held in memory, because it is larger than the default 2.5 MB threshold.

Does the PDF contain hidden content?

No. The extra bytes are filler characters in a stream object nothing references.

Reference and checks

Format reference: PDF 32000-1.

Preset target: 3 MiB (3,145,728 bytes). Verify the downloaded file's byte count.

Generate another size in this format · Technical notes for every format · Guide to testing file upload limits · Data processing and privacy

Related tools: Merge PDF · Compress PDF.

Noticed an issue with this test file? Report an issue →