explaingit

shipfastlabs/parsel

Analysis updated 2026-05-18

132PHPAudience · developerComplexity · 2/5Setup · moderate

TLDR

A local-first PHP library that extracts text, layout, and OCR content from PDFs, Office files, and images.

Mindmap

mindmap
  root((Parsel))
    What it does
      Extracts text from documents
      Structured page and coordinate data
      OCR for scanned images
    Tech stack
      PHP
      Composer
      Tesseract OCR
      LibreOffice
    Use cases
      Extract text from PDFs
      Parse Office documents
      Screenshot document pages
    Audience
      PHP developers
      Backend engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Extract plain text or structured data from PDFs, Word docs, and spreadsheets in a PHP app.

USE CASE 2

Run OCR on scanned image documents to pull out readable text.

USE CASE 3

Generate page screenshots or JSON exports from documents for downstream processing.

USE CASE 4

Stream and parse very large documents without loading them fully into memory.

What is it built with?

PHPComposerTesseractLibreOfficeImageMagick

How does it compare?

shipfastlabs/parselphenaproxima/starshot-prototypedeveloper2013/bricks-mcp-open
Stars13211852
LanguagePHPPHPPHP
Setup difficultymoderatemoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires PHP 8.4+, LibreOffice, and ImageMagick installed on the server.

The README does not state the license terms explicitly.

In plain English

Parsel is an open-source PHP library for reading and extracting content from documents including PDFs, Word files, spreadsheets, presentations, and images. Everything runs locally on your own server, so your documents are never sent to a third-party service. The library is available as a Composer package, which is the standard way to install PHP dependencies. The API is designed to feel straightforward. You point it at a file or provide raw file bytes, choose what you want back, and call a method. The simplest use is getting the full text of a document as a plain string. For more detailed work, a structured parse returns a document object containing each page, and within each page a list of text items with their position coordinates, which is useful when you need to know where on the page something appears rather than just what it says. For documents that are scanned images rather than text-based files, Parsel can apply OCR, which stands for optical character recognition: a process that looks at the image and identifies the characters in it. OCR is off by default because it takes more time. You can turn it on per request and specify a language, a path to language data files, or the number of parallel workers. The underlying OCR engine is Tesseract, accessed through a companion tool called liteparse. Page selection lets you limit parsing to specific pages, a range, or a maximum count rather than always processing the entire document. For very large documents, a streaming mode lets you process pages one at a time without loading everything into memory. Other supported features include rendering page screenshots to image files, saving output as plain text or JSON, setting rendering resolution, providing a password for encrypted PDFs, and adjusting the timeout for slow documents. The library requires PHP 8.4 or newer and depends on LibreOffice for Office format conversion and ImageMagick for image handling, both of which are standard open-source tools available on Linux, macOS, and Windows.

Copy-paste prompts

Prompt 1
Show me how to install Parsel via Composer and extract plain text from a PDF.
Prompt 2
Help me set up OCR with Parsel for scanned image documents in a specific language.
Prompt 3
Write PHP code using Parsel to get structured page and coordinate data from a document.
Prompt 4
Explain how to stream-parse a large PDF with Parsel without running out of memory.

Frequently asked questions

What is parsel?

A local-first PHP library that extracts text, layout, and OCR content from PDFs, Office files, and images.

What language is parsel written in?

Mainly PHP. The stack also includes PHP, Composer, Tesseract.

What license does parsel use?

The README does not state the license terms explicitly.

How hard is parsel to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is parsel for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.