/facebook

A simple facebook generating class based on FPDF.

Primary LanguagePHPMIT LicenseMIT

Facebook

A simple facebook generating class based on FPDF.

Install

Via Composer

$ composer require xu/facebook

Usage

// create a facebook instance
$pdf = new Facebook();

// set the default font
$pdf->SetFont('Times', '', 12);

// add users
$pdf->addUsers([
    User::fromArray([
        'image'      => __DIR__ . "/blue.png",
        'name'       => "lixu",
        'desc'       => "Hi, \nI am lixu.",
    ])
]);

// render it
$pdf->render();

// output to browser
$pdf->Output();

Example

Please see example for details.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

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