with one click
Read and extract text content from PDF files using pdfplumber (Python)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Read and extract text content from PDF files using pdfplumber (Python)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when the E2E tester needs to invoke Hermes CLI for end-to-end testing — starting services, running browser/API tests, and collecting structured reports. Covers correct CLI flags, prompt templates, toolset selection, error handling, and output parsing.
Use when working with the AgentArts CLI — agentarts init, agentarts dev, agentarts launch, agentarts invoke, agentarts config, or agentarts_config.yaml. Covers deployment, local dev, invoking deployed agents, troubleshooting ARM64/Observability/Gateway issues, and the .agentarts_config.yaml schema.
| name | |
| description | Read and extract text content from PDF files using pdfplumber (Python) |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"file-reading"} |
**/*.pdf).pdfplumber (Python library).Use this when the user asks to read, inspect, or extract information from a PDF file, or when a task references content in a PDF document.
Ensure pdfplumber is installed:
pip install pdfplumber
If the PDF path is unknown, search for it:
Glob: **/*.pdf
Use Python with pdfplumber. Set PYTHONIOENCODING=utf-8 to handle Unicode characters in the output:
$env:PYTHONIOENCODING='utf-8'; python -c "
import pdfplumber, sys
path = sys.argv[1]
with pdfplumber.open(path) as pdf:
print(f'Pages: {len(pdf.pages)}')
for i, page in enumerate(pdf.pages):
text = page.extract_text()
if text:
print(f'\\n<<< PAGE {i+1} / {len(pdf.pages)} >>>\\n')
print(text)
" '<absolute-path-to-pdf>'
For large PDFs, specify start and end page numbers (1-indexed):
$env:PYTHONIOENCODING='utf-8'; python -c "
import pdfplumber, sys
path, start, end = sys.argv[1], int(sys.argv[2]), int(sys.argv[3])
with pdfplumber.open(path) as pdf:
for i in range(start - 1, min(end, len(pdf.pages))):
text = pdf.pages[i].extract_text()
if text:
print(f'\\n<<< PAGE {i+1} / {len(pdf.pages)} >>>\\n')
print(text)
" '<path>' <start> <end>
$env:PYTHONIOENCODING='utf-8'; $file = Get-ChildItem -Path '<search-dir>' -Filter '*.pdf' -Recurse | Select-Object -First 1; python -c "
import pdfplumber, sys
with pdfplumber.open(sys.argv[1]) as pdf:
print(f'Pages: {len(pdf.pages)}')
for i, page in enumerate(pdf.pages):
text = page.extract_text()
if text:
print(f'\\n<<< PAGE {i+1} >>>\\n' + text)
" $file.FullName
If the PDF contains tabular data:
$env:PYTHONIOENCODING='utf-8'; python -c "
import pdfplumber, sys, itertools
with pdfplumber.open(sys.argv[1]) as pdf:
for pi, page in enumerate(pdf.pages):
tables = page.extract_tables()
for ti, table in enumerate(tables):
print(f'\\n--- Table in Page {pi+1} ---')
for row in table:
print(' | '.join([c or '' for c in row]))
" '<path>'
After extracting, synthesize the key information relevant to the task. Strip boilerplate (legal notices, page headers/footers) and focus on the substantive content.