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
0as no evidence-based whitespace removal,1or100%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/3removes 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
- Render the input PDF before editing and visually inspect representative pages, especially pages with unusually large or edge-adjacent content.
- Obtain the trim proportion from the user as described above.
- Run the trimmer with the explicit proportion and a JSON report: