Download and extract text from a PDF URL using curl and a PDF text extraction tool.
Usage
# Download PDF
curl -L -o document.pdf "URL"
# Extract all text from PDF (requires pdftotext from poppler-utils)
pdftotext document.pdf output.txt
# Or use Python's pdfplumber for better text extraction
python3 -c "import pdfplumber; pdf = pdfplumber.open('document.pdf'); text = '\n\n'.join([page.extract_text() for page in pdf.pages]); print(text)"
Installation
macOS
brew install poppler # for pdftotext
# or
pip install pdfplumber # for Python approach
Linux
sudo apt-get install poppler-utils # for pdftotext
# or
pip install pdfplumber # for Python approach
Example
# Download a PDF
curl -L -o document.pdf "https://example.gov/document.pdf"
# Extract all text
pdftotext document.pdf document.txt
# View the extracted text
cat document.txt
1---2name: 2953-fetch-pdf-360ca3de3description: fetch-pdf4---5# fetch-pdf67Download and extract text from a PDF URL using curl and a PDF text extraction tool.89## Usage1011```bash12# Download PDF13curl -L -o document.pdf "URL"1415# Extract all text from PDF (requires pdftotext from poppler-utils)16pdftotext document.pdf output.txt1718# Or use Python's pdfplumber for better text extraction19python3 -c "import pdfplumber; pdf = pdfplumber.open('document.pdf'); text = '\n\n'.join([page.extract_text() for page in pdf.pages]); print(text)"20```2122## Installation2324### macOS25```bash26brew install poppler # for pdftotext27# or28pip install pdfplumber # for Python approach29```3031### Linux32```bash33sudo apt-get install poppler-utils # for pdftotext34# or35pip install pdfplumber # for Python approach36```3738## Example3940```bash41# Download a PDF42curl -L -o document.pdf "https://example.gov/document.pdf"4344# Extract all text45pdftotext document.pdf document.txt4647# View the extracted text48cat document.txt49```
Run npx skillmds@latest add tools-only/2953-fetch-pdf-360ca3de in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
fetch-pdf It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tools-only (@tools-only) published this skill. Their other Agent Skills are listed on their SkillMD profile.