PHPackages                             imdong/lightpdf-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. imdong/lightpdf-ocr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imdong/lightpdf-ocr
===================

OCR recognition based on lightpdf.com

111PHP

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/imdong/Lightpdf-Ocr)[ Packagist](https://packagist.org/packages/imdong/lightpdf-ocr)[ RSS](/packages/imdong-lightpdf-ocr/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Lightpdf-Ocr
============

[](#lightpdf-ocr)

基于Lightpdf的Ocr识别类

概述
--

[](#概述)

本代码只是应用一个实现的可能，请勿滥用本包。

请手动至  识别。

运行环境
----

[](#运行环境)

- PHP 7.0+
- cURL extension
- JSON extension

安装方法
----

[](#安装方法)

1. 建议您通过composer管理您的项目依赖，可以在你的项目根目录运行：

    ```
     $ composer require imdong/lightpdf-ocr

    ```

    或者在你的`composer.json`中声明对Lightpdf-Ocr的依赖：

    ```
     "require": {
         "imdong/lightpdf-ocr": "*"
     }

    ```

    然后通过`composer install`安装依赖。composer安装完成后，在您的PHP代码中引入依赖即可：

    ```
     require_once __DIR__ . '/vendor/autoload.php';

    ```

快速使用
----

[](#快速使用)

1. 同步使用，可能会由于时间太久导致超时：

    ```
     $ocrBody = ImDong\LightpdfOcr::inFile($filename);

    ```
2. 异步使用，网页推荐这样使用。

    ```
     // 创建 Ocr 识别对象，获取并保存返回状态值
     $clientStatus = ImDong\LightpdfOcr::inFileAsync($filename);

     // 异步轮训调用接口并传回状态值直至获取到结果
     $ocrInfo = ImDong\LightpdfOcr::inFileAsyncCheck($clientStatus);

    ```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/afa742737cc44fc9d5ea90d4151c82ca2561ac40a9ffd28dab1865d153f85b22?d=identicon)[imdong](/maintainers/imdong)

---

Top Contributors

[![imdong](https://avatars.githubusercontent.com/u/993536?v=4)](https://github.com/imdong "imdong (11 commits)")

### Embed Badge

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

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

PHPackages © 2026

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