pdf

Extract, merge, split, create, and encrypt PDF documents using Python libraries and command-line tools.

1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/qfwc258/trae-skills --skill pdf-qfwc258
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/qfwc258/trae-skills/tree/main/pdf
Command: npx skills add https://github.com/qfwc258/trae-skills --skill pdf-qfwc258

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, reportlab, pytesseract, pdf2image, pandas.

What problem does it solve? Working with PDF files programmatically is fragmented across many libraries and tools, making it hard to know which approach to use for tasks like text extraction, merging, form filling, or OCR on scanned documents. ## Core Features & Use Cases - Text and Table Extraction: Pull text and structured tables from PDFs using pdfplumber and pypdf, with OCR support for scanned documents via pytesseract. - PDF Manipulation: Merge, split, rotate, watermark, encrypt, and decrypt PDFs using pypdf, qpdf, or pdftk. - PDF Creation: Generate new PDFs with reportlab, including multi-page reports with proper subscript and superscript rendering. - Use Case: Combine twelve monthly report PDFs into a single annual document, then extract all financial tables into an Excel spreadsheet for analysis. ## Quick Start Use the pdf skill to merge the three attached PDF files into a single combined document.

Frequently Asked Questions about pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract tables from a PDF in Python?

Use pdfplumber's page.extract_tables() method to detect and extract tables from each PDF page. The results can be loaded into pandas DataFrames and exported to Excel for further analysis.

How do I merge multiple PDF files into one?

Use pypdf's PdfWriter to add pages from each source PDF and write the combined output, or run qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf from the command line.

Can I extract text from a scanned PDF?

Scanned PDFs contain images rather than text layers, so standard parsers return nothing. Convert pages to images with pdf2image, then run pytesseract OCR on each image to recover the text.

Why do subscripts render as black boxes in reportlab PDFs?

ReportLab's built-in fonts lack Unicode subscript and superscript glyphs, so those characters render as solid boxes. Use the <sub> and <super> XML tags inside Paragraph objects instead.

How do I remove a password from an encrypted PDF?

Run qpdf --password=mypassword --decrypt encrypted.pdf decrypted.pdf to produce an unprotected copy. You must know the existing password to decrypt the file.