sarabitcom/fpdf-barcode
Composer 安装命令:
composer require sarabitcom/fpdf-barcode
包简介
library to generate pdf document with barcode support
README 文档
README
library to generate pdf document with bar-code support
Create Object
$pdf = new \Sarabitcom\Fpdf\FpdfCode39('P', 'mm', 'A4');
Set Margins
$pdf->SetLeftMargin(68); $pdf->SetRightMargin(1); $pdf->SetTopMargin(90);
Add Page
$pdf->AddPage();
Set Headers (Optional)
$pdf->SetAuthor('You Name');
$pdf->SetCreator('Sarabit PDF Barcode');
$pdf->SetTitle('Document Title');
$pdf->SetSubject('Document Subject');
Add Barcode
$pdf->Code39(138, 160, "1234567890", 1, 10);
Set Image
$imagePath = "/home/user/yourimage.jpeg"; // Absolute Path $pdf->Image($imagePath, 0, 0, 210, 297);
Set Font
// Normal
$pdf->SetFont('Times', '', 12);
// Bold
$pdf->SetFont('Times', 'B', 11);
// Italic
$pdf->SetFont('Times', 'I', 11);
Make Cell
$pdf->Text(68, 164, "Your Text Here");
Output
$pdf->Output('file.pdf', 'I');
统计信息
- 总下载量: 200
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-28