pdfplumber: Extract Text, Tables, and Objects from PDFs

pdfplumber: Extract Text, Tables, and Objects from PDFs

Summary

pdfplumber is a Python library for inspecting machine-generated PDFs and extracting text, tables, and positioned page objects. It suits developers who need more layout detail and visual debugging than basic text extraction provides.

At a glance

Language
Python
License
MIT
Stars
10.8k
Forks
928
Added to OSRepos
January 24, 2026
Last analyzed
October 3, 2026
View on GitHub

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Overview

pdfplumber parses PDFs into detailed, positioned objects such as characters, lines, rectangles, curves, and images. Built on pdfminer.six, it adds higher-level text and table extraction tools for documents where layout and object coordinates matter.

It is aimed at Python developers working with machine-generated PDFs. For scanned documents, OCR is needed elsewhere; pdfplumber does not provide OCR or PDF editing and generation.

Key Features

  • Inspect page objects and their properties, including character text, font, size, and coordinates.
  • Extract page text, words, and searchable text matches with bounding boxes.
  • Find and extract tables using graphical lines, text alignment, or explicitly supplied separators.
  • Crop and filter pages to focus extraction on specific regions or objects.
  • Render pages and overlay detected objects or table boundaries for visual debugging.
  • Use a command-line interface to export object data as CSV or JSON, or page text as plain text.

Use Cases

  • Data engineers can turn machine-generated reports into structured text or table data for downstream processing.
  • Analysts can extract tables from PDFs and tune detection when documents have unusual layouts or weakly defined cell borders.
  • Developers investigating extraction errors can inspect object coordinates and visualize page structure.
  • Teams processing forms can use its PDF parsing wrappers to access form-field values, though there is no dedicated form API.

Project Facts

  • Language: Python
  • License: MIT
  • Stars: 10.8k
  • Forks: 928
  • Topics: pdf, pdf-parsing, table-extraction
  • Archived: No

Getting Started

Install with pip:

pip install pdfplumber

For usage examples and configuration details, see the README.

Alternatives

  • pdfminer.six: pdfminer.six focuses on parsing PDF text and layout details, while pdfplumber adds a higher-level interface for inspecting objects and extracting tables.
  • pypdf: pypdf combines text extraction with PDF editing tasks such as merging and splitting, while pdfplumber focuses on layout-aware inspection and extraction.
  • Marker: Marker converts PDFs and other documents into Markdown or structured formats, including scanned files, while pdfplumber focuses on inspecting machine-generated PDFs.

Considerations

  • Works best with machine-generated PDFs. Scanned PDFs and OCR-derived documents are not its strength, and OCR is not included.
  • Parsing is built on pdfminer.six and is slower than PyMuPDF according to the project’s comparison; choose another tool if speed is the priority.
  • Table extraction is configurable, but results depend on document layout and may require cropping or tuning settings.
  • Text layout extraction is marked experimental, as are some search and text-line features.
  • The library exposes image positions and metadata but does not reconstruct image content. It also does not generate or modify PDFs.

Found this useful?

Share it with someone who would like pdfplumber.

Comparisons

Source repository

Open the original repository on GitHub.

29 counted GitHub visits

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️