Skip to content

avoutic/web-framework-browserless

Repository files navigation

WebFramework Browserless Module

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

About

Browserless module for PDF generation with web-framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages