pdf-resizer

Resize and optimize scanned PDFs by detecting and cropping content areas.

8|Updated Jul 26, 2026
One-click install
npx skills add https://github.com/joonlab/joonlab-claudecode-setting-for-share --skill pdf-resizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-resizer
Source: https://github.com/joonlab/joonlab-claudecode-setting-for-share/tree/main/claude/skills/pdf-resizer
Command: npx skills add https://github.com/joonlab/joonlab-claudecode-setting-for-share --skill pdf-resizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PIL, pdf2image, cv2, numpy, and includes scripts (resource) components.

What problem does it solve?

This skill solves the issue of inconsistent, poorly scanned, or oversized PDF documents by automatically detecting content, cropping unnecessary margins, and compressing file sizes while maintaining high visual quality.

Core Features & Use Cases

  • Dual-Masking Content Detection: Uses advanced text and line detection to ensure critical content is preserved while removing noise and shadows.
  • Batch Processing: Efficiently handles multiple documents with standardized sizing and compression settings.
  • Use Case: Ideal for educators or researchers who need to standardize exam papers, worksheets, or textbooks to a uniform size for distribution or printing.

Quick Start

Use the pdf-resizer skill to resize the scanned document named exam_paper.pdf to the standard target dimensions.

Frequently Asked Questions about pdf-resizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically crop margins and resize scanned PDF documents?

To automatically crop margins and resize scanned PDF documents, you can apply a dual-masking algorithm that detects content areas while removing unnecessary margins, noise, and shadows. This process standardizes page dimensions and compresses file sizes for distribution.

What is the best way to batch process exam papers to achieve uniform page dimensions?

The best way to batch process exam papers for uniform page dimensions is using automated document processing tools that apply standardized sizing and compression settings across multiple files simultaneously, ensuring consistent output for printing or distribution.

Do I need Ghostscript and OpenCV to compress scanned PDFs while maintaining visual quality?

Yes, you need Ghostscript and OpenCV, along with Pillow, to compress scanned PDFs while maintaining visual quality. These dependencies execute the image processing and PDF compression tasks required for dual-masking content detection and optimization.

How does dual-masking content detection work for scanned educational materials?

Dual-masking content detection works by applying advanced text and line detection algorithms to scanned educational materials. This ensures critical content is preserved while automatically identifying and cropping unnecessary margins, noise, and shadows from the document.

Can I standardize scanned worksheets to a uniform size for printing without losing text quality?

You can standardize scanned worksheets to a uniform size for printing without losing text quality by using intelligent resizing algorithms. These algorithms detect and preserve critical content areas while compressing file sizes and removing unnecessary margins.