mops1k/unoserver-client
最新稳定版本:v0.0.2
Composer 安装命令:
composer require mops1k/unoserver-client
包简介
PHP client for unoserver(ex. unoconv) converter.
README 文档
README
Simple library to run unoconvert inside your php applications.
Installation
composer require mops1k/unoserver-client
Usage example
- From document:
<?php use Unoserver\Converter\ClientBuilder; use Unoserver\Converter\Wrapper\Remote; use Unoserver\Converter\Source\Format; $builder = new ClientBuilder(); $builder->init(Remote::class, [ 'command' => '/usr/bin/unoconvert', // path to unoconvert binary 'host' => '127.0.0.1', // remote unoserver host 'port' => 2003, // remote unoserver port ]); $client = $builder->fromDocument('/document/path.docx'); // set path to file convert from $client->toFormat(Format::PDF); // set format to convert to $file = $client->convert(); // will return \SplFileInfo object with converted file
- From spreadsheet:
<?php use Unoserver\Converter\ClientBuilder; use Unoserver\Converter\Wrapper\Remote; use Unoserver\Converter\Source\Format; $builder = new ClientBuilder(); $builder->init(Remote::class, [ 'command' => '/usr/bin/unoconvert', // path to unoconvert binary 'host' => '127.0.0.1', // remote unoserver host 'port' => 2003, // remote unoserver port ]); $client = $builder->fromSpreadsheet('/document/path.xlsx'); // set path to file convert from $client->toFormat(Format::PDF); // set format to convert to $file = $client->convert(); // will return \SplFileInfo object with converted file
More docs soon...
统计信息
- 总下载量: 138
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-05