LaravelPackages.net
Acme Inc.
Toggle sidebar
apsg/certificate

Create PDF certificates

30
0
0.1.0
About apsg/certificate

apsg/certificate is a Laravel package for create pdf certificates. It currently has 0 GitHub stars and 30 downloads on Packagist (latest version 0.1.0). Install it with composer require apsg/certificate. Discover more Laravel packages by apsg or browse all Laravel packages to compare alternatives.

Last updated

Certificates

Latest Version on Packagist Total Downloads Build Status StyleCI

Helper package to provide easy PDF certificates generation. It uses FPDI/FPDF under the hood and is configured to provide support for Polish language. It works as a Laravel 5/6 package but there is not much of Laravel specific functionality added, so it can be used in other projects as well.

Installation

Via Composer

$ composer require apsg/certificate

Usage


use Apsg\Certificate\Certificate;
use Apsg\Certificate\Fields\Field;
use Apsg\Certificate\Formats\A4LandscapeFormat;

class CertificateController extends Controller
{
    /**
     * This will output the pdf to browser to download
     */
    public function test()
    {
        $certificate = new Certificate(null, new A4LandscapeFormat());

        return $certificate
            ->setBackground(storage_path('app/public/tlo.png'))
            ->addField(new Field('test zażółć gęślą', 10, 100, 20))
            ->generate();
    }
}
 

Note: the background would be stretched to fill the page, so use proper resolution and orientation for best results.

Testing

$ composer test

Star History Chart