YYSI — AI News & Toolbox中文

PDF Crop verification — public fixtures & expected values

"Show your verification" should mean you can rerun it. This page publishes the original synthetic fixtures, the exact expected crop boxes, and the independent-reader method for YYSI's browser-based PDF Crop. Everything here is original and synthetic — no real documents.

ReproducibleNo accountCropping is not redaction

Fixture 1 — a file that already has a CropBox

Download cropbox-origin.pdf (1 KB). Page geometry: MediaBox 600 × 800 pt with an existing CropBox (50, 100, 550, 700) — what a viewer shows today is the 500 × 600 pt region. This is the case most croppers get wrong.

Margins enteredExpected CropBox after croppingExpected visible size
0 on all four sides(50, 100, 550, 700) — unchanged500 × 600 pt
10 pt on all four sides(60, 110, 540, 690)480 × 580 pt

· Zero margins must KEEP the visible area — a tool that resets the page to its MediaBox (600 × 800) fails this check.
· Since 2026-11-13, YYSI's PDF Crop anchors cropping to the page's current visible frame (CropBox when present, else MediaBox), so pre-cropped files keep their visible area and non-zero MediaBox origins are preserved.

Fixture 2 — rotations, mixed sizes, one pre-cropped page

Download multipage-rotation.pdf (1 KB). Three pages: page 1 is 600 × 800 with /Rotate 90; page 2 is 500 × 600 with an existing CropBox (10, 10, 480, 580) and /Rotate 180; page 3 is 400 × 400 with /Rotate 270. Expected results when you crop with 15 pt on all four sides and a page range of "2-3":

PageExpected after cropping
1 (Rotate 90)Untouched — outside the range; no CropBox added
2 (Rotate 180, pre-cropped)CropBox (25, 25, 450, 550); rotation preserved; visible 450 × 550 pt
3 (Rotate 270)CropBox (15, 15, 370, 370); rotation preserved; visible 370 × 370 pt

· Crop boxes live in unrotated page space; a 180° rotation keeps width × height, while 90°/270° swap them in the viewer.

Method — rerun it yourself

  1. Open PDF Crop, load a fixture, enter the margins above, crop, and download the result.
  2. Inspect the output with any independent PDF reader — not the browser library. With PyMuPDF, for example:
python -c "import pymupdf; d = pymupdf.open('cropped.pdf'); print(d.xref_get_key(d[0].xref, 'CropBox'))"
  1. Compare against the expected boxes on this page.

How YYSI verifies it continuously: the same real engine code runs against these fixtures with the exact library the browser uses (pdf-lib), and every output is re-read with PyMuPDF as an independent reader — crop boxes, visible sizes, rotation, page counts and text. That check is part of the first-party regression suite. A 25.4 mm-every-side crop on a plain A4 page yields the crop box exactly (72.00, 72.00, 523.28, 769.89) — verified on 2026-11-12 and unchanged by the 2026-11-13 visible-frame fix for CropBox-less pages.

Machine-readable expected values

expected-values.txt lists every expectation above in plain text.

Limits, stated plainly

· Cropping HIDES content; it is not redaction and never deletes data from the file.
· Arbitrary-shape cropping is out of scope (edge/aspect trims only).
· Real-device touch testing (iOS/Android) has not been done; desktop and 390 px mobile browser flows were verified.
· This is a reproduction pack, not a certification. Fixture files are original synthetic work by YYSI and may be reused for testing; provided as-is.