JapSeyz / pdf-renderer

PDF Renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDF Renderer

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.

About

PDF Renderer

License:MIT License


Languages

Language:PHP 100.0%