This handles the full PDF workflow: reading text from existing files, creating new ones from markdown or HTML, and merging or splitting documents. It wraps PyMuPDF for most operations, with fallbacks to pdftotext and pandoc depending on what you have installed. The skill shines when you need to extract content from a PDF for analysis or programmatically generate reports. One thing to note: it assumes you're working with text-based PDFs, so if you're dealing with scanned documents, you'll need to layer in OCR separately. The markdown-to-PDF path via pandoc is surprisingly clean for generating formatted output without touching ReportLab directly.

skills.sh installs
179
GitHub stars
80.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add shareai-lab/learn-claude-code --skill pdf --agent claude-code

Installs into .claude/skills of the current project.

Files

PDF Processing Skill

You now have expertise in PDF manipulation. Follow these workflows:

Reading PDFs

Option 1: Quick text extraction (preferred)

# Using pdftotext (poppler-utils)
pdftotext input.pdf -  # Output to stdout
pdftotext input.pdf output.txt  # Output to file

# If pdftotext not available, try:
python3 -c "
import fitz  # PyMuPDF
doc = fitz.open('input.pdf')
for page in doc:
    print(page.get_text())
"

Option 2: Page-by-page with metadata

import fitz  # pip install pymupdf

doc = fitz.open("input.pdf")
print(f"Pages: {len(doc)}")
print(f"Metadata: {doc.metadata}")

for i, page in enumerate(doc):
    text = page.get_text()
    print(f"--- Page {i+1} ---")
    print(text)

Creating PDFs

Option 1: From Markdown (recommended)

# Using pandoc
pandoc input.md -o output.pdf

# With custom styling
pandoc input.md -o output.pdf --pdf-engine=xelatex -V geometry:margin=1in

Option 2: Programmatically

from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas

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

Sponsors

Details

Repository
github.com/shareai-lab/learn-claude-code
Categories
Git & Pull Requests, Documentation, Office & Documents
First seen
Jun 3, 2026

More from shareai-lab/learn-claude-code

All 2
1aibtcdev avatarbusiness-devaibtcdev/skillsFull-cycle revenue engine — prospecting, CRM pipeline management, closing deals, partnerships, and engineering-as-marketing. External sales via GitHub and web.176skills.sh installs
2madappgang avataropenrouter-trending-modelsmadappgang/claude-codeFetch trending programming models from OpenRouter rankings. Use when selecting models for multi-model review, updating model recommendations, or researching cur173skills.sh installs
3microsoft avatarwinui-packagingmicrosoft/win-dev-skillsMSIX packaging, code signing, and distribution for WinUI 3 apps — build for release, certificate generation (winapp cert generate), certificate trust, code sign170skills.sh installs
4mvanhorn avatarpp-dubmvanhorn/printing-press-libraryEvery Dub feature, plus offline search, agent-native output, and a local SQLite store no other Dub tool has. Trigger phrases: `shorten a link with Dub`, `audit 170skills.sh installs
5anthropics avatarnda-triageanthropics/knowledge-work-pluginsScreen incoming NDAs and classify them as GREEN (standard), YELLOW (needs review), or RED (significant issues). Use when a new NDA comes in from sales or busine169skills.sh installs
6charleswiltgen avataraxiom-ui-recordingcharleswiltgen/axiomUse when setting up UI test recording in Xcode 26, enhancing recorded tests for stability, or configuring test plans for multi-configuration replay. Based on WW169skills.sh installs