ssgglobal / laravel-pdfreactor
A PHP wrapper for using PDFreactor with Laravel.
Installs: 6 100
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 0
Open Issues: 0
Requires
- php: >= 8.2
- guzzlehttp/guzzle: ^7.4.5
- illuminate/support: ^10|^11
Requires (Dev)
- mockery/mockery: ^1.5
- orchestra/testbench: ^8|^9
- phpunit/phpunit: ^10
README
Laravel PDFreactor
A PHP wrapper for using PDFreactor with Laravel 6+.
Setup
Requirements
- Illuminate/Support 6.0+.
- GuzzleHttp/Guzzle ^6.3.1 Or ^7.0.1
Installation
# Install package
composer require ssgglobal/pdfreactor
# Publish Config
php artisan vendor:publish --provider="StepStone\PdfReactor\ServiceProvider"
The pdfreactor
config options will be merged into config/services.php
.
Register Service Provider
In your config/app.php
add the following to providers
array.
'providers' => [
StepStone\PdfReactor\ServiceProvider::class,
],
Configuration
Set your PDFreactor configuration options in .env
Option | Default | |
---|---|---|
PDFREACTOR_HOST | none | URL to PDFreactor web service. |
PDFREACTOR_PORT | 9243 | Default listener port for PDFreactor server. |
PDFREACTOR_KEY | none | API Key if authentication is enabled. |
Register Alias (optional)
In your config/app.php
add the following in the alias
array.
'aliases' => [
'PdfReactor' => StepStone\PdfReactor\Facade::class,
]
Usage
For a full list of functions visit PDFreactor's website.
$config = [
// PDFreactor config options
];
$document = PdfReactor::convertAsync($config);
Testing
// Use docker compose to turn on the server
docker-compose up -d
// run phpunit
./vendor/bin/phpunit