Skip to content

hashgraph-online/awesome-codex-plugins / plugins/alpoxdev/hypercore/skills/hyper-pdf

hyper-pdf

Verified

Use this skill when the user asks to read, extract from, or produce a PDF - text, tables, images, metadata, form fields, OCR of a scan, merge, split, rotate, watermark, encrypt, or a Korean contract, invoice, or report - and wants the result verified rather than assumed. Two generation paths with an explicit routing rule, a zero-dependency macOS runtime, and checks for font embedding, language tag, and structure tree. Do not use for Word or HWP documents, screenshots, slide decks, or numeric charts.

rules/ocr.ko.md

View on GitHub
# 스캔 쪽 OCR

> 스캔한 쪽에는 글자가 아니라 픽셀이 있습니다. OCR은 그 픽셀 위에 텍스트 레이어를 더할 뿐 픽셀을 고치지 않고, 정확도는 엔진이 아니라 이미지의 성질입니다.

## 1. OCR이 필요한 때

| 조건 | 할 일 |
|---|---|
| `check`가 `PAGE_NEEDS_OCR`을 보고 | 나열된 쪽만 OCR |
| 쪽에 이미 텍스트 레이어가 있음 | OCR하지 않음. 레이어가 두 겹이 되어 검색이 깨짐 |
| 글자가 있는 쪽에서 한 단어만 안 읽힘 | OCR 사안이 아님. 원본에 그 글자가 없음 |
| 이미지가 회전하거나 기울어짐 | OCR 가능. Vision은 약한 기울기는 다루고 20° 회전은 다루지 않음 |
| 대략 150 DPI 미만 | 정확도 저하를 예상. 키우거나 더 나은 스캔을 요청 |

## 2. 동작 방식

```
engine.js ocr <pdf> --out OUT.pdf [--langs ko-KR,en-US] [--pages SPEC] [--work-dir DIR]
```

쪽마다 2배로 렌더하고 Vision 텍스트 인식을 돌린 뒤, 인식한 줄을 측정한 상자에 보이지 않는 렌더 모드로 그립니다. 보이지 않는 렌더 모드(PDF 텍스트 렌더 모드 3)는 잉크 없이 글리프 위치와 문자를 기록하므로 쪽은 그대로 보이고 선택·검색·복사가 동작합니다.

| 선택 | 이유 |
|---|---|
| 원본 위에 그리고 쪽을 다시 렌더하지 않음 | 다시 그리면 원본 래스터 품질을 잃고 화면이 바뀜 |
| 인식 관측마다 보이지 않는 줄 하나 | 읽는 사람이 선택하는 단위와 맞음. 쪽당 덩어리 하나는 아님 |
| 관측 높이에서 글자 크기를 유도 | 선택 강조가 대략 잉크 위에 오게 함 |
| `--langs`로 언어 지정 | Vision은 문자 체계로 모델을 고름. 한국어 쪽에 `en-US`만 주면 쓰레기가 나옴 |

## 3. 정확도와 정직

- `textCharacters`와 `perPage[].observations`를 보고합니다. 잉크가 있는 쪽에서 관측이 0이면 인식 실패이고 빈 쪽이 아닙니다.
- 인식 결과를 조용히 교정하지 않습니다. 사용자가 깨끗한 전사를 원하면 별도 작업이고, 원본 레이어는 인식된 그대로 남겨야 다시 확인할 수 있습니다.
- 숫자, 주민등록번호, 계좌번호에서 인식이 가장 자주 틀립니다. 금융 문서에서는 인도 전에 그 필드를 이미지와 대조해 읽습니다.
- 인식률은 문서 품질의 보장이 아닙니다. 유일한 증명은 쪽을 열어 읽는 것입니다.

## 4. OCR 후

1. `check`를 다시 돌립니다. 처리한 쪽의 `PAGE_NEEDS_OCR`이 사라져야 합니다.
2. 처리한 쪽에 `text`를 돌립니다. 문자열이 선언한 언어로 그럴듯해야 합니다.
3. 같은 쪽을 `render`합니다. 화면이 바뀌지 않아야 합니다. 보이지 않아야 할 텍스트가 보이면 렌더 모드가 적용되지 않은 것입니다.
4. 출력 디렉터리의 `.hyper-pdf-ocr`에 중간 래스터가 있습니다. 확인 후 지웁니다. PDF보다 몇 배 큽니다.

## 5. OCR이 못 하는 것

- 스캔이 망가뜨린 글자를 되살리지 못합니다. 번진 숫자는 모호한 채로 남습니다.
- 표 구조를 추론하지 못합니다. 셀 경계는 만들어진 텍스트 레이어에 `tables`를 돌려 얻고 한계도 같습니다.
- 텍스트가 맞음을 증명하지 못합니다. 법적 확실성이 필요한 사람은 이미지를 읽습니다.

## Sources

> Checked 2026-11-13.

| Claim | Source |
|---|---|
| Vision 텍스트 인식과 언어 선택 | <https://developer.apple.com/documentation/vision/recognizing-text-in-images> |
| PDF 텍스트 렌더 모드 3(보이지 않음) | <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf> (§9.3.6) |
| 스캔 해상도에 따른 OCR 정확도 | <https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html> (접근 근거. 이 구현은 Vision 사용) |

### Evidence grade

동작 방식·플래그·출력은 이 기기에서 래스터만 있는 PDF로 돌려 확인한 `LOCAL`입니다. 형식 수준의 렌더 모드 주장은 `SPEC`입니다.
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall