extracting-pdf-text

Extract text, tables, and OCR data from PDFs into Markdown.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill extracting-pdf-text-zurybr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extracting-pdf-text
Source: https://github.com/Zurybr/lefarma-skills/tree/main/tools/extracting-pdf-text
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill extracting-pdf-text-zurybr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mistralai, pdfplumber, pymupdf4llm, pytesseract, pdf2image, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the extraction of text from PDF documents, transforming them into a format that Large Language Models (LLMs) can easily process for tasks like RAG, document analysis, and general text extraction.

Core Features & Use Cases

  • Versatile Extraction: Supports text-based PDFs, PDFs with tables, and scanned documents using OCR.
  • Multiple Tool Options: Integrates with efficient local libraries (PyMuPDF, pdfplumber) and powerful APIs (Mistral OCR) to handle various PDF complexities.
  • Use Case: You need to ingest a large collection of scanned research papers into a knowledge base for an LLM. This Skill can process each PDF, extract the text and tables, and output it in a clean Markdown format suitable for RAG.

Quick Start

Use the extracting-pdf-text skill to extract text from the file 'report.pdf' and save it to 'report.md'.

Frequently Asked Questions about extracting-pdf-text

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

FAQPage Schema
How do I extract text from scanned PDF documents for LLM ingestion?

Extract text from scanned PDFs for LLM ingestion by applying OCR via Tesseract and pdf2image or using the Mistral OCR API. This converts image-based pages into clean, LLM-ready Markdown outputs.

What's the best way to parse PDF tables for RAG pipelines?

Parsing PDF tables for RAG pipelines is best handled using pdfplumber to extract structured data. The process transforms tabular PDF content into clean Markdown formats suitable for LLM consumption.

Does PyMuPDF support converting text-based PDFs to Markdown for document analysis?

PyMuPDF supports converting text-based PDFs to Markdown for document analysis via the pymupdf4llm library. It extracts text and structures it into an LLM-ready output format.

Can I use the Mistral OCR API for batch extracting PDF text?

You can use the Mistral OCR API for batch extracting PDF text from complex or scanned documents. It integrates into the workflow to facilitate RAG pipelines by providing clean extracted text.

When do I need OCR for PDF text extraction instead of local libraries?

You need OCR for PDF text extraction when handling scanned documents or image-based files that local libraries like PyMuPDF cannot read. Tesseract processes these images to extract the hidden text.

Why use pdfplumber vs pymupdf4llm for LLM-ready text extraction?

Use pdfplumber when extracting complex tables and structured data, whereas pymupdf4llm is suited for converting text-based PDFs into clean Markdown. Both prepare documents for RAG pipelines.