PHPackages                             abcreche/print - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. abcreche/print

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

abcreche/print
==============

Generate Print Ready Document

v3.1.0(5mo ago)34.2k↓50%MITPHPPHP &gt;=8.3

Since Nov 22Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/abcreche/print)[ Packagist](https://packagist.org/packages/abcreche/print)[ Docs](https://github.com/abcreche/print)[ RSS](/packages/abcreche-print/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (36)Used By (0)

Generate Print Ready Document
=============================

[](#generate-print-ready-document)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cc4ddf73fecc956d08b4b19f7322e651a60cd55b1ecf866686cdcd7eae5567f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61626372656368652f7072696e742e737667)](https://packagist.org/packages/abcreche/print)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

Installation
------------

[](#installation)

You can install this package via composer using this command:

```
composer require abcreche/print
```

The package will automatically register itself

Usage
-----

[](#usage)

This package uses "Print Document Template" classes to generate PDF that you can then print via the browser. These classes are filled with data that you position as you like. This is particularly helpful to fill in official document that rely on specific templates.

### Make Print Templates

[](#make-print-templates)

First, make a new print document:

```
php artisan make:print ReceiptTemplate
```

The file can be foudn in `app/PrintTemplates`:

```
.
├── app
│   ├── PrintTemplates
│   │   ├── ReceiptTemplate.php
│
└── composer.json

```

In your controller you can generate the PDF for this print template now:

```
