mcpField
P
PDF Compress

PDF Compress

github.com/claude-office-skillsドキュメント5454.7k 回インストール39 週間前に更新
リポジトリ

PDF Compress について

PDF Compressは、PDFのファイルサイズを小さくしたい人向けのガイダンススキルです。圧縮目標や画質との兼ね合いを検討できますが、実際の圧縮は行いません。

主な機能

  1. 01圧縮レベルのガイダンス
  2. 02画質とサイズの調整
  3. 03用途別の推奨設定
  4. 04一括処理の計画
  5. 05圧縮レポート

活用シーン

  1. 01メール送信用PDFの準備
  2. 02Web閲覧用文書の最適化
  3. 03一括圧縮ジョブの計画
  4. 04印刷・アーカイブ設定の選択

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/claude-office-skills/skills --skill pdf-compress

インストール後、Claude Code で/pdf-compressを入力して読み込まれたか確認します。

詳細

PDF 圧縮

PDF のファイルサイズを小さくして、共有を簡単にし、読み込みを速くし、効率的に保存できるようにします。

概要

このスキルでは、次のことができます。

  • PDF のファイルサイズを大幅に削減する
  • 品質とファイルサイズのバランスを取る
  • 特定の用途(ウェブ、印刷、アーカイブ)に合わせて最適化する
  • 複数のファイルを一括圧縮する
  • 圧縮によるトレードオフを理解する

使用方法

基本的な圧縮
"Compress this PDF to reduce file size"
"Make this PDF smaller for email"
"Optimize this PDF for web viewing"
目標を指定した圧縮
"Compress this PDF to under 5 MB"
"Reduce file size by at least 50%"
"Optimize for minimum file size"
品質レベル
"Compress with high quality (minimal loss)"
"Compress for screen viewing"
"Maximum compression, quality not critical"

圧縮レベル

プリセット
レベル用途画像品質サイズ削減率
最小アーカイブオリジナル5-15%
低印刷オリジナルに近い15-30%
中一般用途良好30-50%
高メール/ウェブ許容範囲50-70%
最大プレビューのみ低下70-90%
用途別の推奨設定
用途推奨レベル理由
印刷物の制作最小/低品質が重要
メールへの添付中/高サイズと品質のバランス
ウェブからのダウンロード高読み込みが速い
簡易プレビュー最大速度を優先
アーカイブ低長期的な品質を維持
プレゼンテーション中画面上で良好

圧縮技術

画像の最適化
## Image Compression Settings

### Resolution Reduction
| Target | DPI | Use For |
|--------|-----|---------|
| Screen | 72 | Web viewing |
| eBook | 150 | Digital documents |
| Print-basic | 200 | Office printing |
| Print-quality | 300 | Professional print |
| Original | N/A | No reduction |

### Format Conversion
| From | To | Savings | Quality Impact |
|------|-----|---------|----------------|
| TIFF | JPEG | 70-90% | Some loss |
| PNG | JPEG | 50-80% | Some loss |
| BMP | JPEG | 90%+ | Some loss |
| JPEG | JPEG (recompress) | 20-50% | Cumulative loss |

### Quality Levels
| Setting | JPEG Quality | Visual Impact |
|---------|--------------|---------------|
| Maximum | 90-100 | Imperceptible |
| High | 75-89 | Minimal |
| Medium | 50-74 | Noticeable on zoom |
| Low | 25-49 | Visible artifacts |
コンテンツの最適化
## Additional Optimizations

### Font Optimization
- [ ] Subset fonts (remove unused characters)
- [ ] Convert to standard fonts where possible
- [ ] Remove duplicate font instances

### Structure Optimization
- [ ] Remove unused objects
- [ ] Clean up metadata
- [ ] Linearize for web (fast web view)
- [ ] Remove bookmarks (optional)
- [ ] Remove comments/annotations (optional)

### Content Removal (Caution)
- [ ] Remove hidden layers
- [ ] Remove JavaScript
- [ ] Remove form fields
- [ ] Remove embedded files

出力レポート

圧縮レポート
## PDF Compression Report

### File Summary
| Metric | Before | After | Change |
|--------|--------|-------|--------|
| **File Size** | 45.2 MB | 8.7 MB | -81% |
| **Pages** | 120 | 120 | - |
| **Images** | 89 | 89 | - |

### Compression Applied
| Technique | Savings |
|-----------|---------|
| Image downsampling (150 DPI) | 28.5 MB |
| JPEG compression (75%) | 5.2 MB |
| Font subsetting | 1.8 MB |
| Object cleanup | 1.0 MB |
| **Total Savings** | **36.5 MB (81%)** |

### Quality Assessment
| Aspect | Rating | Notes |
|--------|--------|-------|
| Text clarity | ⭐⭐⭐⭐⭐ | No change |
| Image sharpness | ⭐⭐⭐⭐ | Slight softening |
| Color accuracy | ⭐⭐⭐⭐⭐ | Preserved |
| Zoom quality | ⭐⭐⭐ | Pixelation at 400%+ |

### Recommendations
✅ Suitable for: Email, web, screen viewing
⚠️ Not recommended for: High-quality print, archival
最適化計画
## Compression Strategy: [Document Name]

### Current State
- File size: 150 MB
- Pages: 200
- Issue: Too large for email (limit: 25 MB)

### Target
- Max size: 20 MB
- Maintain readability

### Recommended Approach
1. **Images**: Reduce to 150 DPI, JPEG 70%
   - Expected savings: ~100 MB
2. **Fonts**: Subset embedded fonts
   - Expected savings: ~5 MB
3. **Cleanup**: Remove metadata, optimize structure
   - Expected savings: ~5 MB

### Expected Result
- Final size: ~20 MB
- Quality: Good for screen/general use

一括圧縮

一括処理ジョブのテンプレート
## Batch Compression Job

### Input
- **Folder**: /documents/reports/
- **Files**: 45 PDFs
- **Total Size**: 2.3 GB

### Settings
- Compression level: Medium
- Target: Email-friendly (<10 MB each)
- Image DPI: 150
- JPEG quality: 75%

### Progress
| File | Original | Compressed | Reduction |
|------|----------|------------|-----------|
| report_q1.pdf | 85 MB | 12 MB | 86% |
| report_q2.pdf | 120 MB | 18 MB | 85% |
| report_q3.pdf | 95 MB | 14 MB | 85% |
| ... | ... | ... | ... |

### Summary
| Metric | Value |
|--------|-------|
| Files processed | 45 |
| Total before | 2.3 GB |
| Total after | 380 MB |
| Average reduction | 83% |
| Files under 10 MB | 42/45 |

### Large Files (Need Review)
| File | Size | Recommendation |
|------|------|----------------|
| annual_photos.pdf | 25 MB | Split or higher compression |
| tech_diagrams.pdf | 18 MB | Reduce image count |
| charts_hires.pdf | 15 MB | Acceptable |

品質の比較

圧縮前後の目安
## Quality Comparison Guide

### Image Quality at Different Levels

**Original (300 DPI, no compression)**
- Sharp at all zoom levels
- File size: Large

**High Quality (200 DPI, JPEG 85%)**
- Sharp at 100-200% zoom
- Minor softening at high zoom
- File size: Medium-large

**Medium Quality (150 DPI, JPEG 70%)**
- Good at 100% zoom
- Noticeable softening at 200%+
- File size: Medium

**Low Quality (96 DPI, JPEG 50%)**
- Acceptable at 100%
- Pixelation visible
- File size: Small

### Text Remains Sharp
Note: Text (when vector) remains crisp at all compression levels.
Only embedded text images are affected.

ツールの推奨

オンラインツール
  • SmallPDF:簡単で、品質も良好
  • ILovePDF:無料で、一括処理に対応
  • PDF24:設定可能なオプション
  • Adobe Online:プロフェッショナルな品質
デスクトップソフトウェア
  • Adobe Acrobat Pro:最も細かく制御可能
  • Foxit PDF Editor:優れた代替製品
  • PDF-XChange:豊富なオプション
  • Preview (Mac):基本機能を備えた標準アプリ
コマンドライン
  • Ghostscript:高機能で、スクリプトから利用可能
  • qpdf:高速で、可逆圧縮のオプションあり
  • pdfcpu:モダンな Go ツール
  • img2pdf:画像に特化

制限事項

  • 実際の圧縮は実行できません(ガイダンスを提供します)
  • 圧縮可能なコンテンツがほとんどない PDF もあります
  • スキャンした文書の大部分は画像です
  • すでに圧縮されている PDF は削減効果が小さくなります
  • 極端な圧縮は品質に影響します
  • ベクターグラフィックスはあまり圧縮されません

コメント