pdf-toolkit
Process PDF files with merge, split, rotate, compress, watermark, and password operations via a self-hosted web UI and API. Use when asked to combine PDFs, extract pages, reduce file size, add watermarks, or protect documents with passwords. Triggers include "merge PDF", "split PDF", "compress PDF", "rotate pages", "watermark PDF", "PDF password", or any PDF manipulation task.
Best use case
pdf-toolkit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Process PDF files with merge, split, rotate, compress, watermark, and password operations via a self-hosted web UI and API. Use when asked to combine PDFs, extract pages, reduce file size, add watermarks, or protect documents with passwords. Triggers include "merge PDF", "split PDF", "compress PDF", "rotate pages", "watermark PDF", "PDF password", or any PDF manipulation task.
Teams using pdf-toolkit should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/pdf-toolkit/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pdf-toolkit Compares
| Feature / Agent | pdf-toolkit | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Process PDF files with merge, split, rotate, compress, watermark, and password operations via a self-hosted web UI and API. Use when asked to combine PDFs, extract pages, reduce file size, add watermarks, or protect documents with passwords. Triggers include "merge PDF", "split PDF", "compress PDF", "rotate pages", "watermark PDF", "PDF password", or any PDF manipulation task.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# pdf-toolkit
Self-hosted PDF processing tool. Merge, split, rotate, compress, watermark, and protect PDF files through a web UI or API.
## When to use
- Merging multiple PDF files into one document
- Extracting specific pages or page ranges from a PDF
- Rotating pages that are sideways or upside-down
- Reducing PDF file size for email or web sharing
- Adding a CONFIDENTIAL or DRAFT watermark to all pages
- Password-protecting a PDF before sharing
- Batch processing multiple PDFs in sequence
## Quick Start
```bash
docker compose up -d
open http://localhost:3000
```
## API Usage
All operations accept multipart form data. Responses return a token for downloading the result.
### Merge
```bash
curl -X POST http://localhost:3000/api/merge \
-F "files[]=@first.pdf" \
-F "files[]=@second.pdf" \
-F "files[]=@third.pdf"
# Returns: { "token": "abc123", "filename": "merged.pdf", "pages": 62 }
```
### Split
```bash
curl -X POST http://localhost:3000/api/split \
-F "file=@document.pdf" \
-F "ranges=1-8,9-16"
# Returns: { "token": "abc123", "files": [...] }
```
### Compress
```bash
curl -X POST http://localhost:3000/api/compress \
-F "file=@large.pdf" \
-F "level=medium"
# level: low | medium | high
```
### Watermark
```bash
curl -X POST http://localhost:3000/api/watermark \
-F "file=@document.pdf" \
-F "text=CONFIDENTIAL" \
-F "opacity=0.2" \
-F "position=diagonal" \
-F "fontSize=48"
```
### Password protect
```bash
curl -X POST http://localhost:3000/api/password \
-F "file=@document.pdf" \
-F "userPassword=secretpass" \
-F "allowPrint=true" \
-F "allowCopy=false"
```
### Download result
```bash
curl -o output.pdf http://localhost:3000/api/download/abc123
```
## Environment Variables
| Variable | Description | Default |
|---|---|---|
| PORT | Server port | 3000 |
| TEMP_DIR | Temp file storage | ./tmp |
| MAX_UPLOAD_MB | Max upload size per file in MB | 100 |
| MAX_FILES | Max files per merge | 20 |
| JOB_TTL_MINUTES | Temp file retention | 60 |
| LOG_LEVEL | debug, info, warn, error | info |
## Compression Levels
| Level | Typical reduction | Use case |
|---|---|---|
| low | ~20% | Print-quality documents |
| medium | ~50% | Email sharing |
| high | ~75% | Web thumbnails, previews |
## Troubleshooting
### "PDF is encrypted" error
The file is password-protected. Remove the password using the Password tool first (you will need the current password), then retry the operation.
### File too large
Files over MAX_UPLOAD_MB are rejected with HTTP 413. Lower the file size before uploading, or increase MAX_UPLOAD_MB in your environment.
### Download link not working
Download tokens expire after JOB_TTL_MINUTES (default 60). Process the file again to get a fresh token.Related Skills
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview
Skill: csv-import
## Overview
Skill: Syntax Highlighting
## Purpose
Skill: Pastebin Core
## Purpose