https://github.com/ziming/laravel-docparser
Docparser OCR Package for PHP Laravel
https://github.com/ziming/laravel-docparser
doc-parser docparser document-parsing laravel ocr php
Last synced: 8 months ago
JSON representation
Docparser OCR Package for PHP Laravel
- Host: GitHub
- URL: https://github.com/ziming/laravel-docparser
- Owner: ziming
- License: mit
- Created: 2025-02-03T13:30:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-28T15:37:47.000Z (11 months ago)
- Last Synced: 2025-05-04T03:34:52.401Z (8 months ago)
- Topics: doc-parser, docparser, document-parsing, laravel, ocr, php
- Language: PHP
- Homepage: https://docparser.com/?ref=iavng
- Size: 25.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel package for Docparser
[](https://packagist.org/packages/ziming/laravel-docparser)
[](https://github.com/ziming/laravel-docparser/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/ziming/laravel-docparser/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/ziming/laravel-docparser)
Laravel Package for [Docparser](https://docparser.com/?ref=iavng). A user friendly document parser SaaS.
## Support us
You can support me by becoming a customer of Docparser through my referral link:
[Docparser](https://docparser.com/?ref=iavng)
## Installation
You can install the package via composer:
```bash
composer require ziming/laravel-docparser
```
You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel-docparser-config"
```
This is the contents of the published config file:
```php
return [
'base_url' => env('DOCPARSER_BASE_URL', 'https://api.docparser.com/'),
'api_key' => env('DOCPARSER_API_KEY'),
];
```
## Usage
```php
$docparser = new Ziming\LaravelDocparser::make();
echo $docparser->fetchDocumentFromUrl($parserId, $url);
```
```php
// Alternatively, you can use the facade
use Ziming\LaravelDocparser\Facades\LaravelDocparser;
LaravelDocparser::fetchDocumentFromUrl($parserId, $url);
```
Look at the source code of `src/LaravelDocparser.php` for more methods (link below):
[LaravelDocparser.php](https://github.com/ziming/laravel-docparser/blob/main/src/LaravelDocparser.php)
To learn more about what each method does in more detail, please refer to the [Docparser API documentation](https://docparser.com/api/?iavng).
## Other Resources to Get Started
To learn more about Docparser, I recommend the following resources:
- [Docparser Features](https://docparser.com/features?ref=iavng)
- [Docparser Pricing](https://docparser.com/pricing?ref=iavng)
- [Docparser Blog on Extracting Data from PDF](https://docparser.com/blog/extract-data-from-pdf/?ref=iavng)
- [Docparser Blog on Zonal OCR](https://docparser.com/blog/zonal-ocr/?ref=iavng)
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [ziming](https://github.com/ziming)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.