PHPackages                             kaleu62/pi-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. kaleu62/pi-reader

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

kaleu62/pi-reader
=================

A Simple PDF and Image parser

v0.9(3y ago)1128.5k↓35.3%[1 issues](https://github.com/kaleu62/pi-reader/issues)MITPHPPHP &gt;=7.1

Since Mar 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kaleu62/pi-reader)[ Packagist](https://packagist.org/packages/kaleu62/pi-reader)[ RSS](/packages/kaleu62-pi-reader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (0)

PIReader (PDF's &amp; Images Reader)
====================================

[](#pireader-pdfs--images-reader)

[![Build Status](https://camo.githubusercontent.com/2b691022321a62d675ec2c09f068af5e702ea746eb2c4fc5ce7a1bbf77d100d5/68747470733a2f2f7472617669732d63692e6f72672f6b616c657536322f70692d7265616465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kaleu62/pi-reader)[![](https://camo.githubusercontent.com/1569c37e9ac6bfa6c59bee631756fc9a7d01de13a3cd6f4e10b8d6e33a9082ca/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61393961383864323861643337613739646266362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability)[![](https://camo.githubusercontent.com/612b0cc9bf174bb6b3f0e046a150a7517926472af30e516c446949c4ab7dca4e/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61393961383864323861643337613739646266362f746573745f636f766572616765)](https://codeclimate.com/github/codeclimate/codeclimate/test_coverage)

It's a PDF and Image reader using spatie/pdf-to-text and API from

### How To Use?

[](#how-to-use)

```
$pireader = new PIReader(
    [
        'apiKey' => 'xxxxxxxxx', // ocr.space API Key
        'production' => false
    ]
);

```

Due to the limitation of requests in ocr.space, the 'apiKey' parameter is mandatory, but its apiKey will only be used if the 'production' parameter is set to true.

The application currently consists of some really basic functions:

- Return the OCR parsed Text
- Verify the existence of a text in the document
- Count the number of incidents of a text in the document
- Perform a search in the Text through a regular expression

getArchive($filePath)
---------------------

[](#getarchivefilepath)

This function returns an array with text of the parsed contents of the file (Pdf or image) present in the path informed

```
$pireader->getArchive("http://my_fake_pdf_path/file.pdf");

```

existsInFile($filePath, $string)
--------------------------------

[](#existsinfilefilepath-string)

This function returns a boolean with informing if the text is present in the file of the informed path, if the file is opened correctly it returns boolean, otherwise it returns null

```
$pireader->existsInFile("http://my_fake_pdf_path/file.pdf", "John Doe");

```

countOccurrences($filePath, $string)
------------------------------------

[](#countoccurrencesfilepath-string)

```
$pireader->countOccurrences("http://my_fake_pdf_path/file.pdf", "John Doe");

```

regexFind($filePath, $regex)
----------------------------

[](#regexfindfilepath-regex)

```
$pireader->regexFind("http://my_fake_pdf_path/file.pdf", "[\d{5}\.\d{5} \d{5}\.\d{6} \d{5}\.\d{6} \d{1} \d{14}]");

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~174 days

Recently: every ~340 days

Total

9

Last Release

1225d ago

PHP version history (2 changes)v0.2PHP &gt;=7.2

v0.3PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/962b7ae1edee171afab45eae5c6bf6a6356c80e776bc491bd1a9edbb07758a78?d=identicon)[kaleu62](/maintainers/kaleu62)

---

Top Contributors

[![kaio-souza](https://avatars.githubusercontent.com/u/16223766?v=4)](https://github.com/kaio-souza "kaio-souza (26 commits)")

---

Tags

pdfparserOCRpi-reader

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kaleu62-pi-reader/health.svg)

```
[![Health](https://phpackages.com/badges/kaleu62-pi-reader/health.svg)](https://phpackages.com/packages/kaleu62-pi-reader)
```

###  Alternatives

[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[vaites/php-apache-tika

Apache Tika bindings for PHP: extracts text from documents and images (with OCR), metadata and more...

1171.5M2](/packages/vaites-php-apache-tika)[aspose-cloud/aspose-words-cloud

Open, generate, edit, split, merge, compare and convert Word documents. Integrate Cloud API into your solutions to manipulate documents. Convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction.

32157.4k](/packages/aspose-cloud-aspose-words-cloud)[tecnickcom/tc-lib-pdf-parser

PHP library to parse PDF documents

4092.8k](/packages/tecnickcom-tc-lib-pdf-parser)[wrseward/pdf-parser

PHP library to parse text from PDF files

185.6k](/packages/wrseward-pdf-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
