
pdf-to-text
Convert PDF content to layout-preserving plain text. Use this skill for tables, invoices, columns, or text-only tools that need whitespace and alignment. Use Standard for PDFs with selectable text and Vision for scans or image-only pages. Use pdf-to-markdown instead when headings, lists, and Markdown tables matter.
- Installs
- 90
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/pspdfkit-labs/nutrient-skills --skill pdf-to-text- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pdf-to-text automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Rules for agents
- Convert each PDF once and save the result. Search the saved file instead of converting it again.
- For a known term, start with a bounded search such as
grep -n -i -C2 "term" file | head. - Use the
queryskill when you do not know the exact wording or a plain search returns too many matches. - Use
pdf-to-markdownwhen headings, lists, and tables matter more than whitespace and column alignment. - Do not render PDF pages as images to extract selectable text. Use Vision for scans and image-only PDFs.
PDF to Text
Convert PDFs to plain text while preserving columns, indentation, and table alignment.
Related skills
pdf-to-markdown— preserves headings, lists, tables, and reading order as Markdown.query— searches a large converted file and returns only the most relevant passages.
Usage
Set SKILL_DIR to the absolute path of the directory containing this file. Use $SKILL_DIR/bin/pdf-to-text in the commands below.
The wrapper downloads the CLI from Nutrient's CDN on first use and stores it in ~/.local/share/nutrient/cli/. It checks for updates every six hours.
Convert one PDF
$SKILL_DIR/bin/pdf-to-text INPUT.pdf OUTPUT.txt
Omit OUTPUT.txt to write text to stdout.
Convert several PDFs
For two or more PDFs, pass an input directory and an output directory. The CLI converts the files in parallel.
$SKILL_DIR/bin/pdf-to-text INPUT_DIR/ OUTPUT_DIR/
Use Vision
Vision handles scans, photographs, handwriting, formulas, and complex layouts. With pdf-to-text, Vision writes structured JSON rather than plain text. Use pdf-to-markdown --vision when you want Markdown.
$SKILL_DIR/bin/pdf-to-text --vision INPUT.pdf OUTPUT.json
Standard conversion is free and does not require an account. Vision requires a Nutrient account, API key, or Nutrient CLI license key. With an account or API key, each input page uses one Vision page from the account's monthly allowance. Nutrient CLI license keys keep their existing terms. Failed conversions do not use Vision pages.
If Vision asks for an account, show that message to the user and ask them to run:
$SKILL_DIR/bin/nutrient auth login
Do not start sign-in automatically. Do not retry Vision without authentication.
For unattended use, the user can set NUTRIENT_API_KEY. Never ask the user to paste a key into chat or put it directly in a command.
Account commands
$SKILL_DIR/bin/nutrient auth login
$SKILL_DIR/bin/nutrient auth status
$SKILL_DIR/bin/nutrient auth logout
status shows the current plan, Vision access, and usage waiting to be reported. Never sign out or switch accounts unless the user asks.
Workflow
- Choose Standard or Vision. Start with Standard unless the PDF is scanned or image-only.
- Convert the PDF once and check the exit code. Exit 0 means success.
- Check that the output exists and is not empty.
- Tell the user where the output was saved.
- Do not read a large output file back into context unless the user wants it analyzed. Search it with bounded
grepor thequeryskill instead.
Offline behavior
Standard can continue when Nutrient is unavailable. After Vision connects, it can work offline for one hour and process up to 100 pages before it must reconnect. A document that crosses the 100-page threshold can finish.
Troubleshooting
- Empty or minimal output: The PDF may be scanned or image-only. Offer Vision.
- Vision asks for sign-in: Show the CLI message and ask the user to run
$SKILL_DIR/bin/nutrient auth login. Do not retry first. - No Vision pages remain: Show the CLI message and the pricing page. Do not retry or change account state.
- Credential error during Standard conversion: An explicitly configured key or saved sign-in is invalid. Show the error. Do not remove or replace credentials unless the user asks.
- First run is slow: The wrapper downloads the platform binary once. Later runs use the cached copy.
- Columns look wrong: Try
pdf-to-markdownif headings, lists, and tables matter more than exact spacing. - Other nonzero exit: Read stderr and report the specific error. Common causes include a damaged PDF, unsupported encryption, or a first-run download failure.
Plans and licensing
Standard conversion is free. With an account or API key, Vision uses the account's monthly allowance. Nutrient CLI license keys keep their existing terms. See current plans.
Use is subject to the Nutrient PDF to Markdown License and Nutrient's Privacy Policy. Redistribution, OEM, embedded, and white-label use require a separate agreement with Nutrient.
FAQ
What does the pdf-to-text skill do?
Convert PDF content to layout-preserving plain text. Use this skill for tables, invoices, columns, or text-only tools that need whitespace and alignment. Use Standard for PDFs with selectable text and Vision for scans or image-only pages. Use pdf-to-markdown instead when headings, lists, and Markdown tables matter.
How do I install pdf-to-text?
Run npx skills add https://github.com/pspdfkit-labs/nutrient-skills --skill pdf-to-text in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pdf-to-text/ (personal) or .claude/skills/pdf-to-text/ (project).
Which AI agents can use pdf-to-text?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pdf-to-text safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pdf-to-text?
It is published by pspdfkit-labs in pspdfkit-labs/nutrient-skills. It has 90 recorded installs.
More from pspdfkit-labs/nutrient-skills
pdf-to-markdown
pspdfkit-labs/nutrient-skills
Convert PDF content to structured Markdown for analysis or AI workflows. Use this skill whenever a user needs text or Markdown from a PDF. Use Standard for PDFs with selectable text and Vision for scans or visually complex pages. Use pdf-to-text instead when whitespace and column alignment must be preserved.
query
pspdfkit-labs/nutrient-skills
Search extracted Markdown or plain text with ranked keyword search. Use this skill after pdf-to-markdown or pdf-to-text when you do not know the document's exact wording or a plain grep would return too many matches. For a known term, use a bounded grep first.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.