# spatie/pdf-to-text

Extract text from a pdf

Repository: https://github.com/spatie/pdf-to-text
Canonical: https://ross.abutalabs.com/products/pdf-to-text
Homepage: https://freek.dev/348-a-package-to-extract-text-from-a-pdf
Language: PHP
License: MIT
License Family: permissive
Topics: php, text, pdf, pdf-converter
Last push: 2026-06-02T07:08:44+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 85, release rhythm 26, longevity 100
- inputs: {"age_days": 3898, "days_push": 92, "days_rel": 282, "gap_med": 201.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1029, forks 132 (observed 2026-08-28T04:03:17.567107+00:00)

## What it is
A PHP library that wraps the pdftotext binary to extract plain text from PDF files with a simple, fluent API. It requires the poppler-utils pdftotext executable to be installed on the system.

## Use cases
- extract text from pdf files in php
- parse pdf content into plain text
- convert pdf documents to text
- read text from pdfs in a laravel app
- index pdf documents for search
- pull text out of pdf invoices

## When to choose
- you need simple text extraction from PDFs in PHP
- you can install system binaries like poppler-utils
- you want a minimal, well-maintained wrapper around pdftotext

## When to avoid
- you cannot install system-level binaries on your host
- you need layout, image, or table extraction rather than plain text
- you need OCR for scanned PDFs without a text layer

## Facets
- artifact type: library
- maturity: stable
- function: pdf, parser, ocr
- domain: pdf, files, developer-tools
- platform: php, windows, cli
- tags: pdftotext-wrapper, text-extraction, poppler, spatie, linux, macos

## Member repositories
- spatie/pdf-to-text (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:17.567107+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:07:41.151329+00:00, confidence not recorded.
  - readme: https://github.com/spatie/pdf-to-text (fetched 2026-08-28T04:03:17.567107+00:00, sha 04dd4a5388d3)
  - homepage: https://freek.dev/348-a-package-to-extract-text-from-a-pdf (fetched 2026-08-29T13:07:24.077692+00:00, sha f4255c1afe6e)
  - site_page: https://freek.dev/about (fetched 2026-08-29T13:07:24.080284+00:00, sha e0ef9dccbb05)
- Data as of 2026-08-30T08:39:29.467469+00:00.
