A module for WebFramework that provides PDF generation capabilities using the Browserless service.
composer require avoutic/web-framework-browserless- PHP 8.2 or higher
- WebFramework 8.x
- A Browserless service instance
If you are using the definition from definitions/defitinions.php. You can just add the following browserless.php to your auth config directory (config/auth):
<?php
return [
'local_server' => 'http://your-local-server',
'pdf_endpoint' => 'https://your-browserless-instance/pdf',
'token' => 'your-browserless-token'
];The module provides methods to generate PDFs from web pages:
$browserless->outputPdf('/path/to/page', 'output.pdf');
// or
$stream = $browserless->outputStream('/path/to/page');MIT License - see LICENSE file for details