zotero-pdf-to-text

Convert Zotero PDF attachments into TXT attachments for downstream AI text processing.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/thurlow-research/ResearchClaudeCodeSkills --skill zotero-pdf-to-text-thurlow-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zotero-pdf-to-text
Source: https://github.com/thurlow-research/ResearchClaudeCodeSkills/tree/main/desktop/skills/zotero-pdf-to-text
Command: npx skills add https://github.com/thurlow-research/ResearchClaudeCodeSkills --skill zotero-pdf-to-text-thurlow-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Reading full-text PDFs is expensive and unreliable for AI-based extraction, coding, and screening workflows. This Skill converts each Zotero item's PDF attachment into a plain-text TXT attachment stored alongside the PDF in your Zotero library, so downstream AI tools can consume cheap, clean text instead of binary PDFs. ## Core Features & Use Cases - Batch PDF-to-TXT conversion: Processes every item in one or more Zotero collections, or an explicit list of item keys, using pdftotext (poppler) with UTF-8 output. - Flexible PDF sourcing: Reads PDFs from local ~/Zotero/storage when the library is synced, or downloads them via the Zotero API when files are not on the machine. - Safe, idempotent uploads: Uploads TXT files through Zotero's four-step S3 form-POST flow, skips items that already have a TXT, and deletes half-created attachments on failure so retries stay clean. - Use Case: You are preparing a Zotero collection of 200 papers for full-text AI screening. Run the script with --limit 1 to validate, then with --commit to give every item a TXT sibling for cheap extraction and coding. ## Quick Start Ask Claude to convert the PDFs in your Zotero collection to TXT attachments, starting with a single-item test run before committing the full batch.

Frequently Asked Questions about zotero-pdf-to-text

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

FAQPage Schema
How do I convert Zotero PDF attachments to text files?

Run the pdf_to_text.py script with --collection or --items keys and your Zotero API credentials set as environment variables. It finds each item's PDF, runs pdftotext, and uploads the resulting TXT as a child attachment of the same item.

How do I safely test a Zotero batch upload before committing?

Run with --limit 1 first, since the script defaults to dry-run mode and only uploads when you pass --commit. Verify the TXT attachment appears with an md5 hash in Zotero before processing the full collection.

Does the Zotero PDF to text conversion work without local files?

Yes. If the PDF is not found in local ~/Zotero/storage, the script downloads it through the Zotero API items file endpoint, so it works on machines where the library is not synced.

Why does pdftotext produce a tiny or empty TXT file?

A TXT under 200 bytes usually means the PDF is a scanned or image-only document with no text layer. Those files require OCR, which this script does not perform.

What happens if a Zotero TXT upload fails partway through?

The script deletes the half-created attachment item on any upload failure, so no empty TXT attachment remains to block the idempotency check. You can simply rerun the command to retry.