PHPackages                             zhongwu/printer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zhongwu/printer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zhongwu/printer
===============

zhongwu cloud printer api

v1.0.2(7y ago)022.3k↓36.6%MITPHPPHP &gt;=5.4.0

Since Aug 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fage1151/zhongwu)[ Packagist](https://packagist.org/packages/zhongwu/printer)[ Docs](http://wiki.zhongwuyun.com/)[ RSS](/packages/zhongwu-printer/feed)WikiDiscussions master Synced 2d ago

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

中午云PHP SDK
==========

[](#中午云php-sdk)

安装 install
----------

[](#安装-install)

```
composer require zhongwu/printer

```

示例
--

[](#示例)

- 打印

```
$app_id = '******';

$app_secret = '********';

$rpc = new \zhongwu\protocol\RpcClient($app_id, $app_secret, 'http://api.zhongwuyun.com');

$Zprinter = new \zhongwu\Printer($rpc);

$device_id = '1111111';

$device_secret = '11111111';

$printdata = '中午云拥有自主研发的云打印机，提供稳定高效，高可用的云打印方案';

try {

    $Zprinter->set_args($device_id, $device_secret)->cloud_print($printdata);

} catch (Exception $e) {

}
```

- 设置声音

```
