sarabitcom/fpdf-barcode 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固