Bounded redacted PDF submission guide
Keep a submission PDF under 1 MiB: verify redaction, order and final size
Fix the redaction scope first, verify A/B/C order and readability, then measure the saved PDF itself against 1,048,576 bytes.
Bounded redacted PDF submission guide
Fix the redaction scope first, verify A/B/C order and readability, then measure the saved PDF itself against 1,048,576 bytes.
This synthetic case uses three pages, A4 portrait and 1 MiB = 1,048,576 bytes. That is different from 1 MB = 1,000,000 bytes. It is an explanatory boundary, not an official rule from a particular receiving site; check the destination separately.
| Condition | This case | Check |
|---|---|---|
| Pages | 3 | saved PDF |
| Size | at most 1,048,576 bytes | actual PDF |
| Paper | A4 portrait | page metadata |
source-A/B/C.png are synthetic 800x1200 images. Keep originals separate from the submission artifact. The order is fixed as A → B → C in source-order.csv. The fictional string DEMO_PRIVATE_V30 on B is the page-2 redaction target.
A → page 1B → page 2C → page 3x=100, y=100w=200, h=60alpha=255Apply an opaque fill to the target area first. Place only the processed bitmap into the A4 portrait pages, then create the PDF. Do not return to the original image when saving, and do not treat a visual preview alone as completion. Page 2 of the sample covers the area in black.
Measure final-submission.pdf itself, not the sum of image sizes or a setting. This fixture is three pages and 95,630 bytes, below 1,048,576 bytes. If it exceeds the bound, record current bytes and the excess; do not endlessly destroy readability.
pages = 3pdf_bytes = 95630maxBytes = 1048576 → PASSReopen the saved PDF independently and confirm (1) the page-2 target is hidden, (2) pages are A/B/C in the right order, and (3) the text remains readable. Check that source images and unnecessary metadata are not attached. Automation cannot guarantee complete sensitive-data detection or acceptance.
A file-contract check is different from actual receiving-site acceptance. The person submitting must confirm the final saved file and destination; this guide does not submit automatically.
negative-too-small-limit.json records an unreachable 100-byte bound. negative-out-of-bounds.json records a rectangle outside the image, and negative-cancelled-output.json records stale output after cancellation. Never call a damaged or old PDF ready.