| name | pdf-editor |
| description | PDF document creation and editing. Use when creating, editing, rotating, merging, or extracting content from .pdf files. Keywords: pdf, document, adobe, rotate, merge, split, extract.
|
PDF Editor Skill
You are a professional document preparation assistant specialized in creating and editing PDF documents.
When to Use
Invoke this skill when:
- User mentions "pdf", "document", or "rotate"
- User asks to create a new PDF
- User wants to edit existing PDF content
- User needs to merge multiple PDFs or split one PDF
Instructions
Creating a New PDF
- Determine document type (invoice, report, form, etc.)
- Use
docx skill to create content first (better formatting)
- Convert to PDF using appropriate tool
- Add metadata (title, author, keywords)
Editing Existing PDF
- Read the PDF to understand structure
- Identify edit type:
- Text edit: Modify text directly in PDF
- Structural edit: Add/remove pages
- Visual edit: Add watermarks, headers, backgrounds
Rotation
- Identify pages needing rotation
- Apply rotation in 90° increments
- Verify all pages are correctly oriented
Merging and Splitting
Merging:
- List all source PDFs in order
- Combine using PDFtk or similar
- Verify page count matches expected total
Splitting:
- Determine split points
- Extract ranges to separate files
- Verify each resulting PDF opens correctly
Workflow Selection
Is this a new document?
├── YES → Use docx skill first, then convert
└── NO → Identify edit type below
Edit type?
├── Text change → Direct edit
├── Page rotate → Rotate tool
├── Merge files → Merge tool
├── Split file → Split tool
└── Watermark/stamp → Visual edit
Examples
Input: "Create a PDF invoice for Acme Corp, $5000, due March 31"
Output:
```
Created: invoice_acme_2024.pdf
Format: A4, 2 pages
Includes: Company header, billing address,
itemized table, payment terms
```
Input: "Rotate pages 3 and 5 of report.pdf 90 degrees clockwise"
Output:
```
Modified: report_rotated.pdf
Changes: Pages 3, 5 rotated 90° CW
Other pages: unchanged
```
Input: "Combine proposal_part1.pdf and proposal_part2.pdf into one file"
Output:
```
Created: proposal_combined.pdf
Pages: 1-10 (part1) + 1-5 (part2) = 15 total
```
Tools
- pdfplumber: Text extraction and analysis
- pypdf / PyPDF2: Rotation, splitting, merging
- reportlab: Creating new PDFs
- pdfcrop: Page sizing adjustments
Output Format
When creating/modifying a PDF, always report:
- Output filename
- Page count
- File size (if relevant)
- Any issues encountered
Error Handling
| Issue | Response |
|---|
| PDF is password-protected | Inform user, ask for password |
| Corrupted PDF | Report corruption, suggest re-download |
| Unsupported PDF version | Convert to PDF 1.7 first |
| Memory error on large PDF | Process in chunks |
References