PHPackages                             thefunpower/express\_template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. thefunpower/express\_template

ActiveLibrary[Templating &amp; Views](/categories/templating)

thefunpower/express\_template
=============================

快递面单模板生成

v2.0.1(2y ago)4582Apache-2.0PHPPHP &gt;=7.4

Since Nov 28Pushed 2y agoCompare

[ Source](https://github.com/thefunpower/express_template)[ Packagist](https://packagist.org/packages/thefunpower/express_template)[ RSS](/packages/thefunpower-express-template/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

生成快递面单PDF文件
-----------

[](#生成快递面单pdf文件)

支持以下快递公司

`德邦` `中通` `韵达`

### 安装

[](#安装)

```
composer require thefunpower/helper
composer require thefunpower/express_template

```

### 使用

[](#使用)

```
cp vendor/express_template/img  到对应的web目录

```

### 中通面单

[](#中通面单)

```
use ExpressTemplate\Zto;
$tpl = new Zto;
$tpl->image_url = '';
//收 图片的URL地址
$tpl->revice_img_url = "http://sf1/wp-content/plugins/express/lib/template/revice.png";
//底部左侧二维码的URL地址
$tpl->qr_url         = "http://sf1/wp-content/plugins/express/lib/template/zto_qr.png";
//保存的路径
$save_path = __DIR__.'/d.pdf';
$s = $tpl->output([
    'time'=>'2023-01',
    'bill_code'=>73100118865046,//运单号
    'mark'=>'356-01-02AOF3-11',//大头笔
    'bag_addr_1'=>'乌鲁木齐', //集包地
    'bag_addr_2'=>'华志路333',
    'name'=>'IPHONE 100', //品名内容
    'desc'=>'备注内容', //备注
    'type'=>'标快',//
    //收货人
    'receiver'=>[
        'name'=>'收货人',
        'phone'=>'19900000001',
        'address'=>'上海上海上海上海上海上海上海上海上海上海',
    ],
    'sender'=>[
        'name'=>'发货人',
        'phone'=>'18900000002',
        'address'=>'北京北京北京北京北京北京北京北京北京北京北京',
    ],
    //'save_path'=> $save_path,
    //'return_content'=>true,
]);
echo $s;

```

[![中通](example/zto.png)](example/zto.png)

### 韵达

[](#韵达)

```
use ExpressTemplate\Yd;
$tpl = new Yd;
//收 图片的URL地址
$tpl->revice_img_url = "http://sf1/wp-content/plugins/express/lib/template/revice.png";
$tpl->sender_img_url = "http://sf1/wp-content/plugins/express/lib/template/sender.png";
//底部左侧二维码的URL地址
$tpl->qr_url         = "http://sf1/wp-content/plugins/express/lib/template/db_qr.jpg";
//保存的路径
$save_path = __DIR__.'/d.pdf';
$s = $tpl->output([
    'time'=>now(),
    'bill_code'=>31213671370856,//运单号
    'mark'=>'300A G262-00 F3',//大头笔
    'bag_addr_1'=>'乌鲁木齐', //集包地
    'bag_addr_2'=>'华志路333',
    'name'=>'IPHONE 100', //品名内容
    'desc'=>'备注内容备注内容备注内容备注内容备注内容备注内容备注内容备注内容', //备注
    'type'=>'普快',//
    //收货人
    'receiver'=>[
        'name'=>'收货人',
        'phone'=>'19900000001',
        'address'=>'上海上海上海上海上海上海上海上海上海上海',
    ],
    'sender'=>[
        'name'=>'发货人',
        'phone'=>'18900000002',
        'address'=>'北京北京北京北京北京北京北京北京北京北京北京',
    ],
    //'save_path'=> $save_path,
    //'return_content'=>true,
]);
echo $s;

```

[![韵达](example/yd.png)](example/yd.png)

### 德邦

[](#德邦)

```
use ExpressTemplate\Db;
$tpl = new Db;
//收 图片的URL地址
$tpl->revice_img_url = "http://sf1/wp-content/plugins/express/lib/template/revice.png";
$tpl->sender_img_url = "http://sf1/wp-content/plugins/express/lib/template/sender.png";
//底部左侧二维码的URL地址
$tpl->qr_url         = "http://sf1/wp-content/plugins/express/lib/template/db_qr.jpg";
//保存的路径
$save_path = __DIR__.'/d.pdf';
$s = $tpl->output([
    'time'=>now(),
    'bill_code'=>312136713707566,//运单号
    //子单
    'sub_bill_code'=>312136713707566,//子单号，首次与bill_code值相同
    'sub_title'=>'1/2',//子单/总数
    //
    'title'=>'4纸1木1托10膜',
    'mark'=>'300A G262-00 F3',//大头笔
    'bag_addr_1'=>'乌鲁木齐', //集包地
    'bag_addr_2'=>'华志路333',
    'name'=>'服装 女款 连衣裙黑色+长袖衬衫服装女款 连衣裙黑色+长袖衬衫长袖衬衫服装女款连衣裙黑长袖衬衫服装女款 连衣裙黑', //品名内容
    'desc'=>'备注内容备注内容备注内容备注内容备注内容备注内容备注内容备注内容', //备注
    'type'=>'普快',//
    //收货人
    'receiver'=>[
        'name'=>'收货人',
        'phone'=>'19900000001',
        'address'=>'上海上海上海上海上海上海上海上海上海上海',
    ],
    'sender'=>[
        'name'=>'发货人',
        'phone'=>'18900000002',
        'address'=>'北京北京北京北京北京北京北京北京北京北京北京',
    ],
    //'save_path'=> $save_path,
    //'return_content'=>true,

    'to'=>'大桥路100号',
    'notice'=>'精准卡行',
    'desc1'=>'签收单: 原件返因返单要求:签名、蓝章、身份证号、身份证复印件、仓库收货因执单',
    'desc2'=>'保价金额: 0.00用户单号:96516454145',
    'tip1'=>'自送三方安装',
    'tip2'=>'代收:1200.00到付: 20.00',
]);
echo $s;

```

[![德邦](example/db1.jpg)](example/db1.jpg)

[![德邦](example/db2.jpg)](example/db2.jpg)

[![德邦](example/db3.jpg)](example/db3.jpg)

### 开源协议

[](#开源协议)

[Apache License 2.0](LICENSE)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

897d ago

Major Versions

v1.0.3 → v2.0.12023-12-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6f09836c59d691e60dd442ee29a2b6673d2c8c319b248aedcde7103f17201e1?d=identicon)[sunkangchina2022](/maintainers/sunkangchina2022)

---

Top Contributors

[![sunkangchina](https://avatars.githubusercontent.com/u/66815206?v=4)](https://github.com/sunkangchina "sunkangchina (7 commits)")

---

Tags

php

### Embed Badge

![Health badge](/badges/thefunpower-express-template/health.svg)

```
[![Health](https://phpackages.com/badges/thefunpower-express-template/health.svg)](https://phpackages.com/packages/thefunpower-express-template)
```

###  Alternatives

[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.6M17](/packages/endroid-qr-code-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
