PHPackages                             timatanga/ocr - 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. [Image &amp; Media](/categories/media)
4. /
5. timatanga/ocr

ActiveLibrary[Image &amp; Media](/categories/media)

timatanga/ocr
=============

The timatanga OCR package. OCR processing of images with tesseract ocr

v0.1.0(4y ago)00proprietaryPHPPHP ^8.0

Since Sep 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/timatanga/ocr)[ Packagist](https://packagist.org/packages/timatanga/ocr)[ RSS](/packages/timatanga-ocr/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

Optical Character Recognition (OCR)
===================================

[](#optical-character-recognition-ocr)

This package is a wrapper around the the tesseract-ocr () package. This library depends on

- Symfony Process
- Tesseract OCR, version 4 or later.

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

[](#installation)

composer require dbizapps/ocr

Dependencies
------------

[](#dependencies)

There are many options to install Tesseract OCR according to your opeerating system needs. Personal experiences are limited to macOS for which you can find a recommendation below. Sorry for this inconveniences.

### macOS

[](#macos)

To install Tesseract OCR with support just for english

```
$ brew install tesseract

```

For a fully fledged language installation you can choose

```
$ brew install tesseract tesseract-lang

```

Basic Usage
-----------

[](#basic-usage)

Creating a recognition engine instance doesn't require further attributes

```
// create ocr instance
$engine = new Recognition;

```

Retrieving tesseract specific information

```
// retrieve tesseract version
$version = $engine->version();

// retrieve supported languages
$lang = $engine->supportedLanguages();

```

Input/Output Configuration
--------------------------

[](#inputoutput-configuration)

The target image can be set while creating a new recognition instance or at a later state

```
$engine = new Recognition();

$engine->setImage();

```

The engine can act in file mode to store results in a given output file and output path Without providing output configuration options the later scan process is streaming results

```
$engine = new Recognition(, , );

```

Custom Configuration
--------------------

[](#custom-configuration)

To get an overview of Tesseract OCR configuration options, please refer to

Configuration options can be set individually like

```
// Scan density
$engine->setConfig(['dpi' => 300]);

// OCR Engine mode.
$engine->setConfig(['oem' => 2]);

// Page segmentation method
$engine->setConfig(['psm' => 10]);

// Languages
$engine->setConfig(['languages' => ['eng', 'fra']]);

// output configuration
$engine->setConfig(['configFile' => ['pdf']]);

```

Supported options for configFile are:

- alto Output in ALTO format (OUTPUTBASE.xml).
- hocr Output in hOCR format (OUTPUTBASE.hocr).
- pdf Output PDF (OUTPUTBASE.pdf).
- txt Output plain text (OUTPUTBASE.txt / default).

Instead of setting options individually there is a global settings method

```
$engine->setConfig([
	'dpi' => 300,
	'oem' => 2,
	'psm' => 10,
	'languages' => ['eng', 'fra'],
	'configFile' => ['pdf'],
])

```

Scan usage
----------

[](#scan-usage)

Scanning an image as simple as

```
$result = $engine->scan()

```

If the output-path and output-filename are set, the provided result represents the path to the scaned output. Otherwise the result respresents the scaned output.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1783d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90563099?v=4)[dbizapps](/maintainers/dbizapps)[@dbizapps](https://github.com/dbizapps)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/timatanga-ocr/health.svg)

```
[![Health](https://phpackages.com/badges/timatanga-ocr/health.svg)](https://phpackages.com/packages/timatanga-ocr)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[illuminate/console

The Illuminate Console package.

13046.6M7.3k](/packages/illuminate-console)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[illuminate/process

The Illuminate Process package.

44926.6k129](/packages/illuminate-process)[jolicode/media-bundle

A media management bundle for Symfony applications, with Easyadmin and SonataAdmin integrations.

11716.7k](/packages/jolicode-media-bundle)

PHPackages © 2026

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