pdf-processing-pro
大量のPDFを扱う業務で、フォームや表の処理、文字認識、エラーチェックなどを効率的に行い、複雑なPDFの処理を自動化して業務を円滑に進めるSkill。
📜 元の英語説明(参考)
Production-ready PDF processing with forms, tables, OCR, validation, and batch operations. Use when working with complex PDF workflows in production environments, processing large volumes of PDFs, or requiring robust error handling and validation.
🇯🇵 日本人クリエイター向け解説
大量のPDFを扱う業務で、フォームや表の処理、文字認識、エラーチェックなどを効率的に行い、複雑なPDFの処理を自動化して業務を円滑に進めるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o pdf-processing-pro.zip https://jpskill.com/download/18477.zip && unzip -o pdf-processing-pro.zip && rm pdf-processing-pro.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18477.zip -OutFile "$d\pdf-processing-pro.zip"; Expand-Archive "$d\pdf-processing-pro.zip" -DestinationPath $d -Force; ri "$d\pdf-processing-pro.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
pdf-processing-pro.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
pdf-processing-proフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
PDF Processing Pro
すぐに本番環境で使用できる PDF 処理ツールキットです。事前構築済みのスクリプト、包括的なエラー処理、および複雑なワークフローのサポートが含まれています。
クイックスタート
PDF からテキストを抽出
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
text = pdf.pages[0].extract_text()
print(text)
PDF フォームの分析 (付属のスクリプトを使用)
python scripts/analyze_form.py input.pdf --output fields.json
# 戻り値: すべてのフォームフィールド、型、および位置を含む JSON
バリデーション付きの PDF フォームへの入力
python scripts/fill_form.py input.pdf data.json output.pdf
# 入力前にすべてのフィールドを検証し、エラー報告を含みます
PDF からのテーブル抽出
python scripts/extract_tables.py report.pdf --output tables.csv
# 自動列検出ですべてのテーブルを抽出します
特徴
✅ 本番環境で使用できるスクリプト
すべてのスクリプトには以下が含まれます。
- エラー処理: 詳細なエラーメッセージによる正常な失敗
- バリデーション: 入力バリデーションと型チェック
- ロギング: タイムスタンプ付きの設定可能なロギング
- 型ヒント: IDE サポートのための完全な型アノテーション
- CLI インターフェース: すべてのスクリプトに対する
--helpフラグ - 終了コード: 自動化のための適切な終了コード
✅ 包括的なワークフロー
- PDF フォーム: 完全なフォーム処理パイプライン
- テーブル抽出: 高度なテーブル検出と抽出
- OCR 処理: スキャンされた PDF テキストの抽出
- バッチ処理: 複数の PDF を効率的に処理
- バリデーション: 前処理および後処理のバリデーション
高度なトピック
PDF フォーム処理
以下を含む完全なフォームワークフローについて:
- フィールドの分析と検出
- 動的なフォーム入力
- バリデーションルール
- 複数ページのフォーム
- チェックボックスとラジオボタンの処理
FORMS.md を参照してください
テーブル抽出
複雑なテーブル抽出について:
- 複数ページのテーブル
- 結合されたセル
- ネストされたテーブル
- カスタムテーブル検出
- CSV/Excel へのエクスポート
TABLES.md を参照してください
OCR 処理
スキャンされた PDF および画像ベースのドキュメントについて:
- Tesseract 統合
- 言語サポート
- 画像の前処理
- 信頼性スコアリング
- バッチ OCR
OCR.md を参照してください
含まれるスクリプト
フォーム処理
analyze_form.py - フォームフィールド情報を抽出
python scripts/analyze_form.py input.pdf [--output fields.json] [--verbose]
fill_form.py - データで PDF フォームに入力
python scripts/fill_form.py input.pdf data.json output.pdf [--validate]
validate_form.py - 入力前にフォームデータを検証
python scripts/validate_form.py data.json schema.json
テーブル抽出
extract_tables.py - テーブルを CSV/Excel に抽出
python scripts/extract_tables.py input.pdf [--output tables.csv] [--format csv|excel]
テキスト抽出
extract_text.py - フォーマットを保持してテキストを抽出
python scripts/extract_text.py input.pdf [--output text.txt] [--preserve-formatting]
ユーティリティ
merge_pdfs.py - 複数の PDF を結合
python scripts/merge_pdfs.py file1.pdf file2.pdf file3.pdf --output merged.pdf
split_pdf.py - PDF を個々のページに分割
python scripts/split_pdf.py input.pdf --output-dir pages/
validate_pdf.py - PDF の整合性を検証
python scripts/validate_pdf.py input.pdf
一般的なワークフロー
ワークフロー 1: フォーム送信の処理
# 1. フォーム構造の分析
python scripts/analyze_form.py template.pdf --output schema.json
# 2. 送信データの検証
python scripts/validate_form.py submission.json schema.json
# 3. フォームへの入力
python scripts/fill_form.py template.pdf submission.json completed.pdf
# 4. 出力の検証
python scripts/validate_pdf.py completed.pdf
ワークフロー 2: レポートからのデータ抽出
# 1. テーブルの抽出
python scripts/extract_tables.py monthly_report.pdf --output data.csv
# 2. 分析のためのテキスト抽出
python scripts/extract_text.py monthly_report.pdf --output report.txt
ワークフロー 3: バッチ処理
import glob
from pathlib import Path
import subprocess
# ディレクトリ内のすべての PDF を処理
for pdf_file in glob.glob("invoices/*.pdf"):
output_file = Path("processed") / Path(pdf_file).name
result = subprocess.run([
"python", "scripts/extract_text.py",
pdf_file,
"--output", str(output_file)
], capture_output=True)
if result.returncode == 0:
print(f"✓ Processed: {pdf_file}")
else:
print(f"✗ Failed: {pdf_file} - {result.stderr}")
エラー処理
すべてのスクリプトは一貫したエラーパターンに従います。
# 終了コード
# 0 - 成功
# 1 - ファイルが見つかりません
# 2 - 無効な入力
# 3 - 処理エラー
# 4 - バリデーションエラー
# 自動化での使用例
result = subprocess.run(["python", "scripts/fill_form.py", ...])
if result.returncode == 0:
print("Success")
elif result.returncode == 4:
print("Validation failed - check input data")
else:
print(f"Error occurred: {result.returncode}")
依存関係
すべてのスクリプトには以下が必要です。
pip install pdfplumber pypdf pillow pytesseract pandas
OCR の場合はオプション:
# tesseract-ocr システムパッケージをインストール
# macOS: brew install tesseract
# Ubuntu: apt-get install tesseract-ocr
# Windows: GitHub releases からダウンロード
パフォーマンスのヒント
- 複数の PDF に対しては バッチ処理を使用 してください
--parallelフラグ (サポートされている場合) で マルチプロセッシングを有効 にしてください- 再処理を避けるために 抽出されたデータをキャッシュ してください
- 早期に失敗するように 入力を早期に検証 してください
- 大量の PDF (>50MB) に対しては ストリーミングを使用 してください
ベストプラクティス
- 処理前に 常に入力を検証 してください
- カスタムスクリプトでは try-except を使用 してください
- デバッグのために すべての操作をログに記録 してください
- 本番環境の前に サンプル PDF でテスト してください
- 長時間実行される操作には タイムアウトを設定 してください
- 自動化では 終了コードを確認 してください
- 変更前に オリジナルのバックアップ を取ってください
トラブルシューティング
よくある問題
"Module not found" エラー:
pip install -r requirements.txt
**Tesserac
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
PDF Processing Pro
Production-ready PDF processing toolkit with pre-built scripts, comprehensive error handling, and support for complex workflows.
Quick start
Extract text from PDF
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
text = pdf.pages[0].extract_text()
print(text)
Analyze PDF form (using included script)
python scripts/analyze_form.py input.pdf --output fields.json
# Returns: JSON with all form fields, types, and positions
Fill PDF form with validation
python scripts/fill_form.py input.pdf data.json output.pdf
# Validates all fields before filling, includes error reporting
Extract tables from PDF
python scripts/extract_tables.py report.pdf --output tables.csv
# Extracts all tables with automatic column detection
Features
✅ Production-ready scripts
All scripts include:
- Error handling: Graceful failures with detailed error messages
- Validation: Input validation and type checking
- Logging: Configurable logging with timestamps
- Type hints: Full type annotations for IDE support
- CLI interface:
--helpflag for all scripts - Exit codes: Proper exit codes for automation
✅ Comprehensive workflows
- PDF Forms: Complete form processing pipeline
- Table Extraction: Advanced table detection and extraction
- OCR Processing: Scanned PDF text extraction
- Batch Operations: Process multiple PDFs efficiently
- Validation: Pre and post-processing validation
Advanced topics
PDF Form Processing
For complete form workflows including:
- Field analysis and detection
- Dynamic form filling
- Validation rules
- Multi-page forms
- Checkbox and radio button handling
See FORMS.md
Table Extraction
For complex table extraction:
- Multi-page tables
- Merged cells
- Nested tables
- Custom table detection
- Export to CSV/Excel
See TABLES.md
OCR Processing
For scanned PDFs and image-based documents:
- Tesseract integration
- Language support
- Image preprocessing
- Confidence scoring
- Batch OCR
See OCR.md
Included scripts
Form processing
analyze_form.py - Extract form field information
python scripts/analyze_form.py input.pdf [--output fields.json] [--verbose]
fill_form.py - Fill PDF forms with data
python scripts/fill_form.py input.pdf data.json output.pdf [--validate]
validate_form.py - Validate form data before filling
python scripts/validate_form.py data.json schema.json
Table extraction
extract_tables.py - Extract tables to CSV/Excel
python scripts/extract_tables.py input.pdf [--output tables.csv] [--format csv|excel]
Text extraction
extract_text.py - Extract text with formatting preservation
python scripts/extract_text.py input.pdf [--output text.txt] [--preserve-formatting]
Utilities
merge_pdfs.py - Merge multiple PDFs
python scripts/merge_pdfs.py file1.pdf file2.pdf file3.pdf --output merged.pdf
split_pdf.py - Split PDF into individual pages
python scripts/split_pdf.py input.pdf --output-dir pages/
validate_pdf.py - Validate PDF integrity
python scripts/validate_pdf.py input.pdf
Common workflows
Workflow 1: Process form submissions
# 1. Analyze form structure
python scripts/analyze_form.py template.pdf --output schema.json
# 2. Validate submission data
python scripts/validate_form.py submission.json schema.json
# 3. Fill form
python scripts/fill_form.py template.pdf submission.json completed.pdf
# 4. Validate output
python scripts/validate_pdf.py completed.pdf
Workflow 2: Extract data from reports
# 1. Extract tables
python scripts/extract_tables.py monthly_report.pdf --output data.csv
# 2. Extract text for analysis
python scripts/extract_text.py monthly_report.pdf --output report.txt
Workflow 3: Batch processing
import glob
from pathlib import Path
import subprocess
# Process all PDFs in directory
for pdf_file in glob.glob("invoices/*.pdf"):
output_file = Path("processed") / Path(pdf_file).name
result = subprocess.run([
"python", "scripts/extract_text.py",
pdf_file,
"--output", str(output_file)
], capture_output=True)
if result.returncode == 0:
print(f"✓ Processed: {pdf_file}")
else:
print(f"✗ Failed: {pdf_file} - {result.stderr}")
Error handling
All scripts follow consistent error patterns:
# Exit codes
# 0 - Success
# 1 - File not found
# 2 - Invalid input
# 3 - Processing error
# 4 - Validation error
# Example usage in automation
result = subprocess.run(["python", "scripts/fill_form.py", ...])
if result.returncode == 0:
print("Success")
elif result.returncode == 4:
print("Validation failed - check input data")
else:
print(f"Error occurred: {result.returncode}")
Dependencies
All scripts require:
pip install pdfplumber pypdf pillow pytesseract pandas
Optional for OCR:
# Install tesseract-ocr system package
# macOS: brew install tesseract
# Ubuntu: apt-get install tesseract-ocr
# Windows: Download from GitHub releases
Performance tips
- Use batch processing for multiple PDFs
- Enable multiprocessing with
--parallelflag (where supported) - Cache extracted data to avoid re-processing
- Validate inputs early to fail fast
- Use streaming for large PDFs (>50MB)
Best practices
- Always validate inputs before processing
- Use try-except in custom scripts
- Log all operations for debugging
- Test with sample PDFs before production
- Set timeouts for long-running operations
- Check exit codes in automation
- Backup originals before modification
Troubleshooting
Common issues
"Module not found" errors:
pip install -r requirements.txt
Tesseract not found:
# Install tesseract system package (see Dependencies)
Memory errors with large PDFs:
# Process page by page instead of loading entire PDF
with pdfplumber.open("large.pdf") as pdf:
for page in pdf.pages:
text = page.extract_text()
# Process page immediately
Permission errors:
chmod +x scripts/*.py
Getting help
All scripts support --help:
python scripts/analyze_form.py --help
python scripts/extract_tables.py --help
For detailed documentation on specific topics, see:
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (7,029 bytes)
- 📎 scripts/analyze_form.py (8,684 bytes)