Extracteur PDF

VérifiéPrudence

Extrait le texte, les tableaux et les champs de formulaire des fichiers PDF. Utilisez-le pour convertir des PDF en texte ou Markdown.

Spar Skills Guide Bot
Data & IAIntermédiaire
23/07/2026
Claude CodeCursorCodex
#pdf#text-extraction#table-extraction#pdf-forms#document-parsing

Recommandé pour

Synthèse automatique

Extrait le texte, les tableaux et les valeurs de champs de formulaire d'un fichier PDF via un script Python fourni avec l'environnement virtuel de la skill.

Points forts

  • Trois modes dédiés : texte brut, champs de formulaire (sortie JSON) et tableaux
  • Gestion documentée des tableaux sans bordures grâce aux options --table-strategy text, --bbox et --columns
  • Environnement virtuel et dépendances (pypdf, pdfplumber) fournis, avec procédure de recréation via uv

Limites

  • Aucune OCR : un PDF scanné ne renverra pas de texte
  • L'extraction de tableaux sans bordures demande souvent un réglage manuel des coordonnées (bbox, colonnes)
  • Nécessite un accès shell pour exécuter le script avec l'interpréteur du venv
Quand l'utiliser

À utiliser quand l'utilisateur veut récupérer du texte, des valeurs de formulaire ou des tableaux à partir d'un PDF existant.

Quand l'éviter

À éviter sur des PDF uniquement composés d'images scannées ou lorsqu'il faut restituer la mise en page visuelle du document.

Analyse de sécurité

Prudence
Score qualité88/100

The skill uses bash and network operations for legitimate PDF extraction setup, with no destructive, exfiltration, or obfuscation patterns. The main risk is executing third-party packages and a bundled script on untrusted PDFs, which is typical for this kind of tool but warrants caution.

Points d'attention
  • •Instructs creating a Python virtual environment and installing packages from PyPI via `uv pip install`, which involves network access and execution of third-party code.
  • •Runs a bundled Python script (`scripts/extract.py`) against user-provided PDF files; the script's implementation is not shown in the SKILL.md, so its behavior cannot be fully audited from this file alone.
Comment cette analyse est faite

Exemples

Extract text
Pull all the text out of contract-2024.pdf and save it as plain text.
Read form fields
What values are filled in on the W-9 form at docs/w9-signed.pdf? Dump the field names and values as JSON.
Borderless table
Extract the table from page 3 of report.pdf — it has no ruled lines, just whitespace-aligned columns. Crop to the table area if the page also has prose.

name: pdf-extractor version: 0.1.0 description: Extract text, tables, and form-field values from PDF files. Use when the user wants to pull data out of a PDF, fill a PDF form, or convert PDF content to text/markdown.

PDF Extractor

Extract structured content from PDF files.

When to use this skill

Use this when the user asks to:

  • Pull text or tables out of a PDF
  • Read values from a fillable PDF form
  • Convert a PDF to markdown or plain text

Instructions

  1. Identify the target PDF path from the user's request.

  2. The script depends on pypdf and pdfplumber, which are installed in a venv bundled with this skill. Run the script with the venv interpreter (.venv/bin/python in the skill directory), not the system python. If .venv is missing, create it once with uv:

    uv venv .venv && uv pip install --python .venv -r requirements.txt
    
  3. For plain text extraction, run the bundled script:

    .venv/bin/python scripts/extract.py <path-to-pdf> --mode text
    
  4. For form fields, use --mode fields. The output is JSON mapping field names to values.

  5. For tables, use --mode tables. By default it detects bordered tables via ruled lines. If the table has no borders (columns aligned with whitespace), add --table-strategy text. On a page that mixes prose and a borderless table, also pass --bbox "x0,top,x1,bottom" (PDF points, top-left origin) to crop to just the table — the text strategy otherwise treats the whole page as one table and splits paragraphs into bogus columns. Cross-check column alignment against references/form-fields.md if the layout looks off.

  6. If a borderless table's header still mis-splits (wide header words straddle an inferred column edge), pin the columns explicitly with --columns "x0,x1,...,xN" — the boundary x-coordinates including the outer edges. This buckets each word into a column by its center, so headers stay intact. Pair it with --bbox to also bound the rows (otherwise prose above the table gets bucketed in too). To find the coordinates, inspect word positions with pdfplumber's page.extract_words() (each word has x0/x1).

Notes

  • If a PDF is scanned (image-only), text extraction will be empty — tell the user it needs OCR, which this skill does not perform.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/pdf-extractor-mrx3xy7g' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pdf-extractor-mrx3xy7g/download' --output '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md.part' && mv '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md.part' '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md' && test -s '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pdf-extractor' && cp -R '.skill-downloads/pdf-extractor-mrx3xy7g' '.claude/skills/pdf-extractor'

Cursor
test -f '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md' && test -s '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/pdf-extractor' && cp -R '.skill-downloads/pdf-extractor-mrx3xy7g' '.cursor/skills/pdf-extractor'

Codex
test -f '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md' && test -s '.skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/pdf-extractor' && cp -R '.skill-downloads/pdf-extractor-mrx3xy7g' '.agents/skills/pdf-extractor'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/pdf-extractor-mrx3xy7g'

openskills read 'pdf-extractor-mrx3xy7g'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/pdf-extractor-mrx3xy7g/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires