PHPackages                             nizarp/pdf-vision - 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. nizarp/pdf-vision

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

nizarp/pdf-vision
=================

Convert PDF file to text using Google Vision API

v1.1.1(9y ago)2622[1 issues](https://github.com/nizarp/pdf-vision/issues)MITPHPPHP &gt;=5.5.0CI failing

Since Feb 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nizarp/pdf-vision)[ Packagist](https://packagist.org/packages/nizarp/pdf-vision)[ RSS](/packages/nizarp-pdf-vision/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

Convert a pdf file to text (OCR)
================================

[](#convert-a-pdf-file-to-text-ocr)

This package provides an easy to work with class to convert pdf's to text. It internally uses Google Cloud Vision API. You need to create an API key and add it to your project's `.env` file as follows:

```
GOOGLE_VISION_PROJECTID=your-project-id
GOOGLE_APPLICATION_CREDENTIALS=/Path/To/Your/KeyFile.json

```

[Read about Google Cloud Vision API](https://cloud.google.com/vision/)

How to get service key
----------------------

[](#how-to-get-service-key)

[Google Cloud Vision API Document](https://cloud.google.com/vision/docs/getting-started)

Requirements
------------

[](#requirements)

You should have [Imagick](http://php.net/manual/en/imagick.setresolution.php) and [Ghostscript](http://www.ghostscript.com/) installed.

Install
-------

[](#install)

The package can be installed via composer:

```
$ composer require nizarp/pdf-vision
```

Usage
-----

[](#usage)

Converting a pdf to text is easy.

```
$pdf = new Pdf($pathToPdf);
$pdf->setEnvPath('/path/to/env/.env');
echo $pdf->convertToText();
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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 ~7 days

Total

3

Last Release

3461d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24983?v=4)[Mohamed Nisar](/maintainers/nizarp)[@nizarp](https://github.com/nizarp)

---

Top Contributors

[![nizarp](https://avatars.githubusercontent.com/u/24983?v=4)](https://github.com/nizarp "nizarp (26 commits)")[![brlin-tw](https://avatars.githubusercontent.com/u/13408130?v=4)](https://github.com/brlin-tw "brlin-tw (1 commits)")

---

Tags

pdfconverttextnizarppdf-visiongoogle-cloud-vision

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nizarp-pdf-vision/health.svg)

```
[![Health](https://phpackages.com/badges/nizarp-pdf-vision/health.svg)](https://phpackages.com/packages/nizarp-pdf-vision)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k20](/packages/tempest-framework)[lion/bundle

Lion-framework configuration and initialization package

132.4k5](/packages/lion-bundle)[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.

33182.7k](/packages/aspose-cloud-aspose-words-cloud)

PHPackages © 2026

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