PDF

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

decocms cb01290 2 files · 1.3 KB Updated

File contents

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 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()

decocms/studio/tree/main/packages/sandbox/image/skills/pdf commit cb01290dde

Frequently asked questions

npx skillmds@latest add decocms/pdf