LLMSkillHub
mirroredCopied from decocms/studio under MIT. decocms has not claimed this page, and is not affiliated with LLM SkillHub.

decocms / pdf

Read and extract text from .pdf files, page by page. Use when the user uploads or references a PDF to read or summarize.

0
SKILL.md
823 B

pdf — PDF documents

Use this skill to read text from .pdf files.

Scripts

extract.py

Print text content from a .pdf, page by page.

python /app/org/public/core/pdf/extract.py <path-to-file.pdf>

Output is plain text with --- page N --- separators. PDFs that are pure
scans (image-only, no embedded text layer) will produce empty pages — OCR is
not performed.

Direct pypdf usage

For metadata, structure, splitting, merging, or filling forms, import pypdf
directly. The library is preinstalled.

from pypdf import PdfReader
reader = PdfReader("/path/to/file.pdf")
for page in reader.pages:
    text = page.extract_text()