pdf-tools

Extract text, convert formats, and manipulate pages in PDF documents.

30|5|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/phuetz/code-buddy --skill pdf-tools-phuetz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-tools
Source: https://github.com/phuetz/code-buddy/tree/main/.codebuddy/skills/bundled/pdf-tools
Command: npx skills add https://github.com/phuetz/code-buddy --skill pdf-tools-phuetz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PDFs are ubiquitous but extracting text, converting formats, and reorganizing pages is tedious and error-prone. This Skill provides a toolkit to read, extract, convert, and manipulate PDFs programmatically, improving accuracy and speed.

Core Features & Use Cases

  • Reading & text extraction: Extract plain text or preserve layout from PDF pages.
  • Conversion & manipulation: Convert PDFs to images, HTML, or other formats; merge, split, rotate, and compress PDFs.
  • Use Case: Process a batch of scanned invoices to extract line items and generate a CSV and a summary report.

Quick Start

Install the required CLI tools locally (pdftotext, pdfinfo, pdftoppm, ImageMagick, pandoc, qpdf, Ghostscript) and run sample commands to read, convert, and merge PDFs. Example commands:

  • pdftotext document.pdf -
  • pdfinfo document.pdf
  • pdftoppm -png document.pdf /tmp/page
  • convert page-1.png output.pdf
  • pdfunite a.pdf b.pdf merged.pdf
  • pandoc document.html -o document.pdf

Frequently Asked Questions about pdf-tools

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

FAQPage Schema
How do I extract text from PDF files while preserving the document layout?

To extract text from PDFs, this skill uses the pdftotext command-line tool. You can extract plain text or preserve the original document layout by passing the appropriate flags to pdftotext.

What command-line tools do I need to convert PDFs to images or other formats?

Converting PDFs to images or formats like HTML requires local CLI tools such as pdftoppm, ImageMagick, and pandoc. These dependencies handle the format conversion and image generation processes.

Can I merge, split, and compress PDF documents programmatically?

Yes, you can merge, split, rotate, and compress PDF documents programmatically. The skill utilizes qpdf and Ghostscript to manipulate and reorganize pages across mixed PDF files.

Does this PDF processing skill work for batch processing scanned invoices?

Yes, this skill handles batch processing of scanned invoices. You can extract line items using text extraction, then generate a CSV file and a summary report from the processed PDF data.

What is the best way to automate reading and manipulating multiple PDF documents?

The best way to automate PDF reading and manipulation is through command-line utilities like pdfinfo and Ghostscript. This skill orchestrates these tools to programmatically extract data and reorganize pages.