Skip to content
Back to skills

Pdf Compressor

ASecurity

大きなPDFファイルを圧縮するスキル。ファイルサイズを最大98%削減。 「PDFを圧縮して」「PDFを軽くして」「ファイルサイズを小さくして」等のリクエストで発動。

  • 348 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
developmentpythonbashgit

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add minicoohei/ai-agent-camp --skill pdf-compressor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pdf Compressor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pdf Compressor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/minicoohei-pdf-compressor/badge)](https://www.skillsdirectory.com/skills/minicoohei-pdf-compressor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pdf-compressor
description: "大きなPDFファイルを圧縮するスキル。ファイルサイズを最大98%削減。 「PDFを圧縮して」「PDFを軽くして」「ファイルサイズを小さくして」等のリクエストで発動。"
triggers:
  - PDFを圧縮して
  - PDFを軽くして
  - ファイルサイズを小さくして
  - pdf-compressor
  - PDF compress
  - PDFが重い
---

# PDF Compressor

Compress PDF files by converting pages to optimized images and rebuilding the PDF.

## Workflow

1. Convert PDF pages to images at specified DPI
2. Resize images to target width (maintaining aspect ratio)
3. Compress as JPEG with quality setting
4. Rebuild PDF from compressed images

## Usage

```bash
python scripts/compress.py "{pdf_path}" --width {width} --quality {quality} --output "{output_path}"
```

## Parameters

| Parameter | Required | Default | Description |
|-----------|----------|---------|-------------|
| pdf_path | Yes | - | Path to PDF file to compress |
| --width | No | 1920 | Page width in pixels |
| --quality | No | 85 | JPEG quality (1-100) |
| --dpi | No | 150 | DPI for PDF to image conversion |
| --output, -o | No | auto | Output path (default: {filename}_compressed.pdf) |

## Quality Presets

| Use Case | Width | Quality | Expected Reduction |
|----------|-------|---------|-------------------|
| Web/Email | 1280 | 75 | ~95% |
| Standard | 1920 | 85 | ~90% |
| High Quality | 2560 | 90 | ~80% |
| Print | 3840 | 95 | ~60% |

## Examples

```bash
# Basic compression (default settings)
python scripts/compress.py "large_presentation.pdf"

# Web-optimized (smaller file)
python scripts/compress.py "slides.pdf" --width 1280 --quality 75

# High quality for presentations
python scripts/compress.py "report.pdf" --width 2560 --quality 90

# Custom output path
python scripts/compress.py "document.pdf" -o "document_small.pdf"
```

## Requirements

- Python packages: pdf2image, Pillow, img2pdf
- System: poppler (for pdf2image)
  - macOS: `brew install poppler`
  - Ubuntu: `apt-get install poppler-utils`
  - Windows: [poppler-windows](https://github.com/oschwartz10612/poppler-windows) からバイナリを取得しPATHに追加

## Notes

- Original PDF is not modified
- Text becomes rasterized (not searchable)
- Best for image-heavy presentations and slides
- For text-heavy documents, consider Ghostscript instead

Files in this skill

  • SKILL.en.md2.3 KB
  • SKILL.es.md2.6 KB
  • SKILL.md2.3 KB
  • agents/openai.yaml148 B
  • scripts/compress.py4.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…