---
name: "pdfminer-six-layout-analyzer"
description: "Analyze character layout hierarchies, text boxes, and reading order in unstructured PDFs."
metadata:
  author: "pdfminer.six"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "extract text boxes pdfminer"
  - "analyze pdf reading order"
  - "extract font size per word pdf"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# pdfminer.six Detailed Layout Analyzer

Inspects low-level PDF visual structures using pdfminer.six: LTTextBox, LTTextLine, LTChar font sizes, and bounding box coordinates to reconstruct complex multi-column reading flows.

## When to Invoke
Invoke this skill whenever you need to:
- extract text boxes pdfminer
- analyze pdf reading order
- extract font size per word pdf

## Execution SOP & Rules
1. Configure LAParams(line_overlap=0.5, char_margin=2.0) to fine-tune grouping heuristics.
2. Iterate over LTPage elements and filter by isinstance(element, LTTextBoxHorizontal).
3. Extract character-level font names and sizes from element.get_text() child characters.
4. Handle unhandled PDF stream decompression exceptions gracefully.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
