https://github.com/xu-li/facebook
A simple facebook generating class based on FPDF.
https://github.com/xu-li/facebook
facebook fpdf pdf pdf-generation
Last synced: about 2 months ago
JSON representation
A simple facebook generating class based on FPDF.
- Host: GitHub
- URL: https://github.com/xu-li/facebook
- Owner: xu-li
- License: mit
- Created: 2017-06-30T08:23:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-02T08:43:03.000Z (over 8 years ago)
- Last Synced: 2025-08-04T20:55:40.797Z (11 months ago)
- Topics: facebook, fpdf, pdf, pdf-generation
- Language: PHP
- Size: 157 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Facebook
A simple facebook generating class based on [FPDF](http://www.fpdf.org/).
## Install
Via Composer
``` bash
$ composer require xu/facebook
```
## Usage
``` php
// 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](https://github.com/xu-li/facebook/blob/master/examples/index.php) for details.
## Testing
``` bash
$ phpunit
```
## Contributing
Please see [CONTRIBUTING](https://github.com/xu-li/facebook/blob/master/CONTRIBUTING.md) for details.
## Credits
- [Xu Li](https://github.com/xu-li)
- [All Contributors](https://github.com/xu-li/facebook/contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.