Skip to content
Back to skills

Pypdf Core Pdf Operations

ASecurity

Sub-skill of pdf: pypdf - Core PDF Operations (+2).

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
businesspythongoaws

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill pypdf-core-pdf-operations --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pypdf Core Pdf Operations?

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

Security grade badge for Pypdf Core Pdf Operations
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-pypdf-core-pdf-operations/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-pypdf-core-pdf-operations)

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: pdf-pypdf-core-pdf-operations
description: 'Sub-skill of pdf: pypdf - Core PDF Operations (+2).'
version: 1.2.2
category: data
type: reference
scripts_exempt: true
---

# pypdf - Core PDF Operations (+2)

## pypdf - Core PDF Operations


**Merging PDFs:**
```python
from pypdf import PdfMerger

merger = PdfMerger()
merger.append("file1.pdf")
merger.append("file2.pdf")
merger.write("merged.pdf")
merger.close()
```

**Splitting PDFs:**
```python
from pypdf import PdfReader, PdfWriter

reader = PdfReader("document.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    writer.write(f"page_{i+1}.pdf")
```

**Extracting Metadata:**
```python
reader = PdfReader("document.pdf")
info = reader.metadata
print(f"Author: {info.author}")
print(f"Title: {info.title}")
print(f"Pages: {len(reader.pages)}")
```


## pdfplumber - Advanced Text Extraction


**Text with Layout Preservation:**
```python
import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        text = page.extract_text()
        print(text)
```

**Table Extraction:**
```python
import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    page = pdf.pages[0]
    tables = page.extract_tables()
    for table in tables:
        for row in table:
            print(row)
```


## reportlab - Creating PDFs


**Create PDF from Scratch:**
```python
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas

c = canvas.Canvas("output.pdf", pagesize=letter)
c.drawString(100, 750, "Hello, World!")
c.showPage()
c.save()
```

**Multi-page Documents:**
```python
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet

doc = SimpleDocTemplate("output.pdf", pagesize=letter)
styles = getSampleStyleSheet()
story = []

story.append(Paragraph("Title", styles['Heading1']))
story.append(Paragraph("Body text here.", styles['Normal']))

doc.build(story)
```

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.

Comments

Loading comments…

Newsletter

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