pdf

Extracts text, tables, and structure from PDF files using opendataloader-pdf. Use when reading PDFs, converting PDF to markdown/JSON/HTML, extracting tables from PDF, processing scanned PDFs with OCR, or analyzing PDF content for RAG pipelines. Do NOT use for creating/editing PDFs, Word/Excel/PPT files (use xlsx2md for Excel), or viewing PDFs (use Read tool for simple PDF viewing).

9 stars

Best use case

pdf is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Extracts text, tables, and structure from PDF files using opendataloader-pdf. Use when reading PDFs, converting PDF to markdown/JSON/HTML, extracting tables from PDF, processing scanned PDFs with OCR, or analyzing PDF content for RAG pipelines. Do NOT use for creating/editing PDFs, Word/Excel/PPT files (use xlsx2md for Excel), or viewing PDFs (use Read tool for simple PDF viewing).

Teams using pdf should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pdf/SKILL.md --create-dirs "https://raw.githubusercontent.com/ssiumha/dots/main/prompts/skills/pdf/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pdf/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How pdf Compares

Feature / AgentpdfStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Extracts text, tables, and structure from PDF files using opendataloader-pdf. Use when reading PDFs, converting PDF to markdown/JSON/HTML, extracting tables from PDF, processing scanned PDFs with OCR, or analyzing PDF content for RAG pipelines. Do NOT use for creating/editing PDFs, Word/Excel/PPT files (use xlsx2md for Excel), or viewing PDFs (use Read tool for simple PDF viewing).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# pdf — opendataloader-pdf

PDF를 Markdown, JSON (bounding boxes 포함), HTML로 변환합니다.
벤치마크 #1 (0.90 overall accuracy). Java 11+ 필요.

## Prerequisites

- Java 11+ (`java -version`으로 확인)
- Python 3.10+

```bash
pip install -U opendataloader-pdf
# 복잡한 테이블/OCR/수식이 필요하면:
pip install -U "opendataloader-pdf[hybrid]"
```

## Phase 1: 입력 분석

사용자 요청에서 파악:
1. **PDF 경로** — `$ARGUMENTS`에서 추출 또는 사용자에게 확인
2. **출력 포맷** — markdown (추천), json (좌표 필요 시), html, text (CLI 기본값은 json)
3. **복잡도** — 단순 텍스트 PDF vs 복잡한 테이블/스캔/수식

## Phase 2: 변환 실행

### 기본 변환 (Fast mode)

```bash
opendataloader-pdf <file.pdf> -o <output-dir> -f markdown
```

### Python API

```python
import opendataloader_pdf

opendataloader_pdf.convert(
    input_path=["file.pdf"],
    output_dir="output/",
    format="markdown,json"
)
```

### 주요 옵션

| 옵션 | 설명 | 기본값 |
|------|------|--------|
| `-f, --format` | 출력 포맷 (json, text, html, markdown, markdown-with-html, markdown-with-images) | json |
| `-o, --output-dir` | 출력 디렉토리 | 입력 파일 디렉토리 |
| `--pages` | 추출 페이지 (예: "1,3,5-7") | 전체 |
| `-p, --password` | 암호화된 PDF 비밀번호 | - |
| `--use-struct-tree` | Tagged PDF 구조 트리 사용 | false |
| `--table-method` | 테이블 감지 (default, cluster) | default |
| `--image-output` | 이미지 처리 (off, embedded, external) | external |
| `--image-format` | 이미지 포맷 (png, jpeg) | png |
| `--keep-line-breaks` | 원본 줄바꿈 보존 | false |
| `--sanitize` | 민감 데이터 마스킹 (이메일, 전화번호, IP 등) | false |
| `--include-header-footer` | 머리글/바닥글 포함 | false |
| `--markdown-page-separator` | 페이지 구분자 (%page-number% 사용 가능) | 없음 |

전체 옵션: `resources/options-reference.md`

## Phase 3: Hybrid Mode (복잡한 PDF)

복잡한 테이블, 스캔 PDF, 수식, 차트가 있을 때 사용.
단순 페이지는 로컬(0.05s), 복잡한 페이지만 AI 백엔드로 라우팅.

```bash
# 터미널 1: 백엔드 서버 시작
opendataloader-pdf-hybrid --port 5002

# 터미널 2: 변환
opendataloader-pdf --hybrid docling-fast <file.pdf>
```

| 문서 유형 | 서버 옵션 | 클라이언트 옵션 |
|-----------|-----------|-----------------|
| 복잡한 테이블 | `--port 5002` | `--hybrid docling-fast` |
| 스캔/이미지 PDF | `--port 5002 --force-ocr` | `--hybrid docling-fast` |
| 비영어 스캔 | `--port 5002 --force-ocr --ocr-lang "ko,en"` | `--hybrid docling-fast` |
| 수식 포함 | `--enrich-formula` | `--hybrid docling-fast --hybrid-mode full` |
| 차트 설명 필요 | `--enrich-picture-description` | `--hybrid docling-fast --hybrid-mode full` |

`--enrich-formula`/`--enrich-picture-description` 사용 시 클라이언트에서 반드시 `--hybrid-mode full` 지정.
그렇지 않으면 enrichment가 조용히 무시됨.

## Phase 4: 결과 처리

변환 결과를 사용자 목적에 맞게 가공:

- **RAG 파이프라인** → markdown 포맷, 페이지 구분자 추가 (`--markdown-page-separator "--- page %page-number% ---"`)
- **데이터 추출** → json 포맷 (bounding boxes로 소스 위치 추적)
- **웹 표시** → html 포맷
- **이미지 포함 문서** → markdown-with-images 포맷

## MCP Server

Claude Code에서 MCP 서버로 직접 사용 가능:

```bash
claude mcp add opendataloader-pdf -- uvx opendataloader-pdf-mcp
```

## 중요 원칙

1. **배치 우선**: `convert()` 호출마다 JVM이 생성되므로, 여러 파일은 한 번에 전달
2. **Fast mode 먼저**: 단순 PDF는 hybrid 없이 시도. 테이블이 깨지면 hybrid로 전환
3. **포맷 선택**: 텍스트만 필요 → markdown, 좌표 필요 → json, 웹 표시 → html
4. **Tagged PDF 활용**: 이미 태그된 PDF는 `--use-struct-tree`로 구조 활용
5. **민감 데이터 주의**: 개인정보 포함 PDF는 `--sanitize` 옵션 안내

Related Skills

tree-sitter

9
from ssiumha/dots

AST parsing, S-expression queries, tag extraction via tree-sitter CLI. Use when parsing code into AST, extracting tags, visualizing syntax trees, or performing structural analysis beyond ast-grep.

tidy

9
from ssiumha/dots

Performs small structural code cleanups (tidyings). Use when preparing code changes, removing dead code, reducing nesting, or cleaning up before feature work.

task-naming

9
from ssiumha/dots

CLI command naming convention for Justfile and Makefile. Enforces GAT (group-action-target) word order, grouped listing, mandatory descriptions. Use when creating Justfile recipes, Makefile targets, or reviewing task runner configs for naming consistency. Also use when asking "what should I name this command?" for task runners. Do NOT use for npm scripts, mise tasks, or Claude Code skill naming.

strategic-thinking

9
from ssiumha/dots

체계적 의사결정 프레임워크. First Principles, Trade-off 분석, Cognitive Bias 점검

security

9
from ssiumha/dots

Security expert hub. Code security review (OWASP Top 10, injection, XSS, credentials), vulnerability assessment (KISA 292 items, Unix/Windows server, web pentest, network, DBMS, cloud), ISMS-P certification (101 items, checklist, implementation plan), EFSR financial regulation compliance (전자금융감독규정, 12 articles). 보안 리뷰, 취약점 점검, 인증 준비, 금융규정 준수.

reflect

9
from ssiumha/dots

방향 수정 신호 감지 및 세션 전체 회고. Use when detecting course correction signals ("아니/잠깐/근데"), session retrospective, or reviewing overall progress. /reflect 또는 "회고해줘"로 수동 호출.

refactoring

9
from ssiumha/dots

기존 코드의 안전한 리팩토링. Characterization Test로 동작 보존하며 구조 개선

recall

9
from ssiumha/dots

Load context from Obsidian vault (journals, session pages) and JSONL session history. Vault 위치/구조는 `documentation` skill 참조. Temporal queries scan JSONL by date, topic queries use ir BM25. Use when "recall", "어제 뭐 했지", "what did we work on", "이전 작업", "session history".

qmd

9
from ssiumha/dots

Searches local markdown notes and documents using ir CLI. Use when searching notes, querying documents, managing collections, or retrieving document content.

qa

9
from ssiumha/dots

기능별 QA 체크리스트 생성, 수동 테스트 실행, 결과 기록. Use when QA 테스트, 체크리스트 만들기, 수동 검증, 기능 확인, qa 진행, checklist. Do NOT use for automated test code (use plan-review tdd / code-review instead) or BDD spec (use plan-review bdd instead).

principles

9
from ssiumha/dots

소프트웨어 공학 원칙 바스켓. 원칙 카탈로그 열람, 코드/설계/프로세스/테스트의 원칙 준수도 평가, 위반 식별 및 개선 가이드. Use when 원칙 평가, 원칙 점검, 원칙 검증, principles check, 코드 품질 근본 진단, 설계 원칙 리뷰, 아키텍처 원칙 점검, 프로세스 원칙 점검, 테스트 원칙 점검, 테스트 설계, or when other review skills need a principled foundation. Do NOT use for specific code review (use code-review), security audit (use security), or strategic decisions (use strategic-thinking).

ppt

9
from ssiumha/dots

Generates PowerPoint architecture diagrams with auto-layout and orthogonal routing using PPTXGenJS. Use when creating AWS architecture diagrams, infrastructure layouts, system design slides, IDC 구성도, or any diagram that needs boxes with right-angle connectors in .pptx format. Also use when 아키텍처 다이어그램, 인프라 구성도, PPT 생성, 구성도 만들기, 슬라이드 자동 생성. Do NOT use for simple text-only presentations (use PowerPoint directly), data charts (use data-investigation), or ASCII/Mermaid diagrams (use diagram skill).