Skip to content
Back to skills

Open Pdf

ASecurity

Read, merge, split, fill and create PDF files with pypdf, pdfplumber and reportlab. Use for any .pdf request, for example text or tables to extract, pages to combine or split, a form to fill, or a PDF to produce.

  • 27 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 26, 2026
ai-agentspython

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 26, 2026

npx -y skills add pymc-labs/daimon --skill open-pdf --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Open Pdf?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Open Pdf
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pymc-labs-open-pdf/badge)](https://www.skillsdirectory.com/skills/pymc-labs-open-pdf)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: open-pdf
description: Read, merge, split, fill and create PDF files with pypdf, pdfplumber and reportlab. Use for any .pdf request, for example text or tables to extract, pages to combine or split, a form to fill, or a PDF to produce.
---

# PDF files

Libraries: `pypdf` (pages, merge, split, forms), `pdfplumber` (text and tables),
`reportlab` (new documents), installed in the sandbox. For a missing one, try
`python3 -m pip install`; with no network, say which library is missing.

## Read

```python
import pdfplumber
with pdfplumber.open("in.pdf") as pdf:
    for page in pdf.pages:
        print(page.extract_text()); print(page.extract_tables())
```

No text comes back from a scanned page: say so, and OCR it with
`pytesseract` only if Tesseract exists.

## Merge, split, rotate

```python
from pypdf import PdfReader, PdfWriter
out = PdfWriter()
for name in ("a.pdf", "b.pdf"):
    for page in PdfReader(name).pages: out.add_page(page)
out.write("merged.pdf")
```

Split by adding chosen pages to a new writer; rotate with `page.rotate(90)`.

## Fill a form

`reader.get_fields()` lists the fields; copy the reader into a writer with
`writer.append(reader)` and call `writer.update_page_form_field_values(
writer.pages[0], {"name": "value"})`, then write it.

## Create

Use `reportlab.platypus` (`SimpleDocTemplate`, `Paragraph`, `Table`, `Spacer`)
and `build([...])`. For a styled report prefer HTML or Typst when installed.

## Check

Reopen the output, count pages and extract the text of the first page.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.