minutemanservices / wkhtmltopdf-php-client
PHP Client Library for generating PDFs from HTML using our Wkhtmltopdf Microservice
Installs: 300
Dependents: 0
Suggesters: 0
Security: 0
pkg:composer/minutemanservices/wkhtmltopdf-php-client
Requires
- php: ^7.4|^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- illuminate/support: ^8.0
- illuminate/validation: ^8.0
- konekt/enum: ^3.1
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-10-05 02:55:45 UTC
README
Contribution guidelines
- Update the version constant in the ApiClientclass.
- Update the version in composer.json
- Tag the commit with the same version number.
Requirements
- php: >=7.4.0
- illuminate/support: >=5.0.0
- illuminate/validation: ^8.22
- guzzlehttp/guzzle: ^7.2
- konekt/enum: ^3.1
- ext-json: *
Installing
composer require minutemanservices/wkhtmltopdf-php-client
Laravel Setup
php artisan vendor:publish --provider=MinuteMan\WkhtmltopdfClient\WkhtmltopdfServiceProvider
Usage
1. Create a Document
First, create a new instance of the ApiClient class and provide the URL of the Wkhtmltopdf microservice API and your access key.
$apiClient = new MinuteMan\WkhtmltopdfClient\ApiClient($apiUrl, $apiKey);
Then, create an instance of WkhtmltopdfDocument for each PDF you want to generate.
Pass the instance of the ApiClient class to the PDF document instance.
$pdfDocument = new MinuteMan\WkhtmltopdfClient\WkhtmltopdfDocument($apiClient);
Laravel
In Laravel, you can create a document instance without having to create an ApiClient instance.
$pdfDocument = app()->make(MinuteMan\WkhtmltopdfClient\WkhtmltopdfDocument::class);