proportional-pdf-trimmer

Installation
SKILL.md

Proportional PDF Trimmer

Trim visible whitespace with scripts/proportional_trim.py. Keep page content vector/text-native by detecting from renders but applying PDF crop boxes rather than rasterizing the output.

Required user input

Before processing, determine the requested whitespace trim proportion.

  • If the user already supplied a proportion, use it directly.
  • Otherwise ask: "What proportion of the removable whitespace should I trim? For example: 2/3, 0.67, or 67%."
  • Do not silently assume a default proportion.
  • Interpret 0 as no evidence-based whitespace removal, 1 or 100% as the maximum safe trim, and values in between as partial trimming.
  • Treat the proportion as the fraction of the maximum removable linear margin extent in width and height, not as a percentage of total page area. For example, 2/3 removes two-thirds of the width/height difference between the largest common source page size and the tightest safe common crop, leaving one-third of that removable margin.

Workflow

  1. Render the input PDF before editing and visually inspect representative pages, especially pages with unusually large or edge-adjacent content.
  2. Obtain the trim proportion from the user as described above.
  3. Run the trimmer with the explicit proportion and a JSON report:
Installs
2
GitHub Stars
2
First Seen
Aug 28, 2026