Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joaovdiasb/laravel-pdf-manager

PDF utility to standardize and componentize the generation of PDF documents
https://github.com/joaovdiasb/laravel-pdf-manager

laravel-package laravel-pdf pdf pdf-generation

Last synced: about 2 months ago
JSON representation

PDF utility to standardize and componentize the generation of PDF documents

Awesome Lists containing this project

README

        

# Laravel PDF manager

[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Total Downloads](https://img.shields.io/packagist/dt/joaovdiasb/laravel-pdf-manager.svg?style=flat-square)](https://packagist.org/packages/joaovdiasb/laravel-pdf-manager)

## Installation

Install via composer
```bash
composer require joaovdiasb/laravel-pdf-manager
```

## Configuration

You can optionally change the default values used by publishing the vendor
```bash
php artisan vendor:publish --provider="Joaovdiasb\LaravelPdfManager\LaravelPdfManagerServiceProvider"
```

## Usage

```php
(new PdfManager)->setHeader(view('pdf.header'))
->setFooter('DOCUMENT FOOTER')
->setBody(str_repeat('[NAME]
', 100))
->setData(['[NAME]' => 'Jhon Doe'])
->setPageCounter()
->save('documents');
```

Output PDF LINK HERE

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

## License

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.