avoutic/web-framework-browserless

The Browserless module for web-framework

2.0.0 2025-09-20 16:01 UTC

This package is auto-updated.

Last update: 2025-09-20 16:02:02 UTC


README

A module for WebFramework that provides PDF generation capabilities using the Browserless service.

Installation

composer require avoutic/web-framework-browserless

Requirements

  • PHP 8.2 or higher
  • WebFramework 8.x
  • A Browserless service instance

Configuration

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'
];

Usage

The module provides methods to generate PDFs from web pages:

$browserless->outputPdf('/path/to/page', 'output.pdf');
// or
$stream = $browserless->outputStream('/path/to/page');

License

MIT License - see LICENSE file for details