PHPackages                             bicycle/tesseract-bridge - 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. [CLI &amp; Console](/categories/cli)
4. /
5. bicycle/tesseract-bridge

ActiveLibrary[CLI &amp; Console](/categories/cli)

bicycle/tesseract-bridge
========================

Integration of tesseract bridge via FFI and CLI

0.250(5y ago)02711MITPHPPHP &gt;7.4.0

Since Jan 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vkhramtsov/tesseract-bridge)[ Packagist](https://packagist.org/packages/bicycle/tesseract-bridge)[ RSS](/packages/bicycle-tesseract-bridge/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (1)

A wrapper to work with Tesseract OCR inside PHP via CLI and/or FFI interfaces.

[![Minimum PHP Version](https://camo.githubusercontent.com/8290a6c28a17b1508fe721adac7ee3eac1f7178e89b218b6fc13366c824f65b2/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253230372e342e302d3838393242462e737667)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/8f8e1eed6bcc06e7a8026996c89d2bf8236f29ad53e72502d5506431b9247641/68747470733a2f2f7472617669732d63692e6f72672f766b6872616d74736f762f7465737365726163742d6272696467652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vkhramtsov/tesseract-bridge)[![Codacy Badge](https://camo.githubusercontent.com/8a7e65ab4cb7946dfaf20608d3665771e19b1e094132eb5327b551d89e64dc9f/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3538613332373837313166363439646438306239376336383731313839643032)](https://www.codacy.com/gh/vkhramtsov/tesseract-bridge/dashboard?utm_source=github.com&utm_medium=referral&utm_content=vkhramtsov/tesseract-bridge&utm_campaign=Badge_Grade)[![codecov](https://camo.githubusercontent.com/e70c5ba7179df2d2a396b9b4577823394351b3a2cffef79d815d9b209a640859/68747470733a2f2f636f6465636f762e696f2f67682f766b6872616d74736f762f7465737365726163742d6272696467652f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d55303536544645324f4f)](https://codecov.io/gh/vkhramtsov/tesseract-bridge)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d6bced7cc73b19720e382db21993b295040574f9516239585c4a3ac5a66e613d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f766b6872616d74736f762f7465737365726163742d6272696467652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vkhramtsov/tesseract-bridge/?branch=master)[![Latest stable version on packagist](https://camo.githubusercontent.com/212ec8933449dafe5387851fd8db49ed8dae251aa2438e9dc6a4f605bc0f3e22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62696379636c652f7465737365726163742d6272696467652e737667)](https://packagist.org/packages/bicycle/tesseract-bridge)[![Total downloads](https://camo.githubusercontent.com/f8fa46a9f3a36005753f794dd6c619f17683682462f2a4bc9c1466b3e05862c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62696379636c652f7465737365726163742d6272696467652e737667)](https://packagist.org/packages/bicycle/tesseract-bridge)[![Monthly downloads](https://camo.githubusercontent.com/cb3515b4aa5ee3d291257c1823ad9836ea983a91a3251a118c1e4ead409b6072/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f62696379636c652f7465737365726163742d6272696467652e737667)](https://packagist.org/packages/bicycle/tesseract-bridge)[![License](https://camo.githubusercontent.com/a4772c107dd55b2f89c232dd5f83e8e4460f2489f8e76db46dbe236f4aefa44b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f62696379636c652f7465737365726163742d6272696467652e737667)](https://packagist.org/packages/bicycle/tesseract-bridge)

‼️ **Tested only on FreeBSD, Debian and Ubuntu platforms with [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) version 3 and 4 (see build logs).**

Installation
------------

[](#installation)

Via [Composer](https://getcomposer.org/):

```
$ composer require bicycle/tesseract-bridge

```

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

[![example](tests/data/image/eurotext.png)](tests/data/image/eurotext.png)

- CLI ```php use Bicycle\\Tesseract\\Bridge as TesseractBridge;

    ```
    $configuration = TesseractBridge\Configuration(['binary_path' => 'tesseract']);
    $bridge = new TesseractBridge\CLI($configuration);
    echo $bridge->testGetVersion();
    print_r($bridge->getAvailableLanguages());
    echo $bridge->recognizeFromFile('eurotext.png'); // Set proper path here
    ```

    ```
- FFI ```php use Bicycle\\Tesseract\\Bridge as TesseractBridge;

    ```
    $configuration = TesseractBridge\Configuration(['binary_path' => 'tesseract']);
    $bridge = new TesseractBridge\FFI($configuration);
    echo $bridge->testGetVersion();
    print_r($bridge->getAvailableLanguages());
    echo $bridge->recognizeFromFile('eurotext.png'); // Set proper path here
    ```

    ```

### With languages

[](#with-languages)

- CLI ```php use Bicycle\\Tesseract\\Bridge as TesseractBridge;

    ```
    $configuration = TesseractBridge\Configuration(['binary_path' => 'tesseract']);
    $bridge = new TesseractBridge\CLI($configuration);
    echo $bridge->testGetVersion();
    print_r($bridge->getAvailableLanguages());
    echo $bridge->recognizeFromFile('eurotext.png', ['deu']); // Set proper path here
    ```

    ```
- FFI ```php use Bicycle\\Tesseract\\Bridge as TesseractBridge;

    ```
    $configuration = TesseractBridge\Configuration(['binary_path' => 'tesseract']);
    $bridge = new TesseractBridge\FFI($configuration);
    echo $bridge->testGetVersion();
    print_r($bridge->getAvailableLanguages());
    echo $bridge->recognizeFromFile('eurotext.png', ['deu']); // Set proper path here
    ```

    ```

How to contribute
-----------------

[](#how-to-contribute)

You can contribute to this project by:

- Opening an [Issue](../../issues) if you found a bug or wish to propose a new feature;
- Opening [PR](../../pulls) if you want to improve/create/fix something

Additional
----------

[](#additional)

Please check our [FAQ](./Resources/doc/faq.rst)

License
-------

[](#license)

tesseract-bridge is released under the [MIT License](./LICENSE).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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 ~6 days

Total

3

Last Release

1927d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d47df780fc808f6d45b4245180066f42cb6483c676ce3871e9ab750b189e832?d=identicon)[vkhramtsov](/maintainers/vkhramtsov)

---

Top Contributors

[![vkhramtsov](https://avatars.githubusercontent.com/u/5517373?v=4)](https://github.com/vkhramtsov "vkhramtsov (15 commits)")

---

Tags

clilibraryintegrationOCRTesseractffi

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bicycle-tesseract-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/bicycle-tesseract-bridge/health.svg)](https://phpackages.com/packages/bicycle-tesseract-bridge)
```

###  Alternatives

[toolkit/cli-utils

useful cli tool library of the php

20222.1k16](/packages/toolkit-cli-utils)[proophsoftware/prooph-bundle

Symfony bundle for prooph components to get started out of the box with message bus, CQRS, event sourcing and snapshots

164.3k](/packages/proophsoftware-prooph-bundle)[eddiriarte/console-select

A fancy selection interface for symfony's console component.

117.2k2](/packages/eddiriarte-console-select)

PHPackages © 2026

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