|
1 | 1 | # Laravel package for Fpdf |
2 | 2 |
|
3 | | -[](https://packagist.org/packages/codedge/laravel-fpdf) |
4 | | -[](https://packagist.org/packages/codedge/laravel-fpdf) |
5 | | -[](https://github.com/codedge/laravel-fpdf/actions) |
6 | | -[](https://styleci.io/repos/59506451) |
7 | | -[](https://packagist.org/packages/codedge/laravel-fpdf) |
| 3 | +I am moving off Github to Codeberg. |
8 | 4 |
|
9 | | -Using [FPDF](http://www.fpdf.org/) made easy with Laravel. See [FPDF homepage](http://www.fpdf.org/) for more information about the usage. |
10 | | - |
11 | | -## Installation using [Composer](https://getcomposer.org/) |
12 | | - |
13 | | -```sh |
14 | | -composer require codedge/laravel-fpdf |
15 | | -``` |
16 | | - |
17 | | -## Configuration |
18 | | - |
19 | | -Run |
20 | | -`php artisan vendor:publish --provider="Codedge\Fpdf\FpdfServiceProvider" --tag=config` |
21 | | -to publish the configuration file to `config/fpdf.php`. |
22 | | - |
23 | | -## Usage |
24 | | - |
25 | | -```php |
26 | | -// app/Http/routes.php | app/routes/web.php |
27 | | - |
28 | | -Route::get('/', function (Codedge\Fpdf\Fpdf\Fpdf $fpdf) { |
29 | | - |
30 | | - $fpdf->AddPage(); |
31 | | - $fpdf->SetFont('Courier', 'B', 18); |
32 | | - $fpdf->Cell(50, 25, 'Hello World!'); |
33 | | - $fpdf->Output(); |
34 | | - exit; |
35 | | - |
36 | | -}); |
37 | | -``` |
38 | | - |
39 | | -### Defining fonts |
40 | | - |
41 | | -FPDF comes with a set of fonts already defined and stored in the `src/Fpdf/font` directory. |
42 | | -If you want to add your own font, please have a look at the [Adding new fonts and encodings](http://www.fpdf.org/en/tutorial/tuto7.htm) tutorial. |
43 | | - |
44 | | -You can change the font path, by using the `FPDF_FONTPATH` environment variable. |
45 | | - |
46 | | -## Use in Laravel Vapor |
47 | | - |
48 | | -If you want to use [Laravel Vapor](https://vapor.laravel.com) to host your application, |
49 | | -[a special header](https://docs.vapor.build/1.0/projects/development.html#binary-responses) needs to be attached to each response that FPDF returns to your browser. |
50 | | -To enable the use of this header, add the following environment variable to the Vapor environment file: |
51 | | - |
52 | | -```dotenv |
53 | | -FPDF_VAPOR_HEADERS=true |
54 | | -``` |
| 5 | +This package has been migrated to https://codeberg.org/codedge/laravel-fpdf. |
| 6 | +If you encounter any issues, please open an issue at the new location. |
0 commit comments