japseyz/pdf-renderer

1.0.6 2024-03-30 20:33 UTC

This package is auto-updated.

Last update: 2024-04-30 20:37:07 UTC


README

Installation

You can install the package via composer:

composer require japseyz/pdf-renderer

You can publish the config file with:

php artisan vendor:publish --tag="pdf-renderer-config"

This is the contents of the published config file:

return [
    // Possible values are:
    // 'browsershot', 'api2pdf'
    'service' => 'browsershot'
];

Usage

 $renderer = PDFRenderer::view(
    'documents.invoice',
    [
        'client'          => $client,
    ]
);

return response($renderer->render(), 200, [
    'Content-Type'        => 'application/pdf',
    'Content-Disposition' => 'attachment; filename="invoice.pdf"',
]);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.