paliari / fpdf
FPDF 是一个 PHP 类,允许使用纯 PHP 生成 PDF 文件。FPDF 中的 F 代表 Free:您可以使用它进行任何类型的用途,并根据需要对其进行修改。http://www.fpdf.org
0.0.8
2020-10-01 22:00 UTC
Requires
- ext-gd: *
- ext-mbstring: *
Requires (Dev)
- paliari/php-utils: ^1.1
README
FPDF 是一个 PHP 类,允许使用纯 PHP 生成 PDF 文件。FPDF 中的 F 代表 Free:您可以使用它进行任何类型的用途,并根据需要对其进行修改。 http://www.fpdf.org
安装
composer require paliari/fpdf
使用
<?php require __DIR__ . '/vendor/autoload.php'; $pdf = new \Fpdf\Fpdf(); $pdf->setFont('Arial'); $pdf->addPage(); $pdf->cell(190, 10, 'Batata frita', 1); /** * I: send the file inline to the browser. * D: download. * F: save to a local file with the name. * S: return the document as a string. */ $pdf->output('I');