承接 yigit-serin/office-converter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

yigit-serin/office-converter

最新稳定版本:v0.1.4

Composer 安装命令:

composer require yigit-serin/office-converter

包简介

PHP Wrapper for LibreOffice

README 文档

README

####PHP Wrapper for LibreOffice

Convert offices files to PDF and HTML using LibreOffice or OpenOffice. Supported conversion formats include:

  • pptx => pdf
  • ppt => pdf
  • pdf => pdf
  • docx => pdf, odt, html
  • doc => pdf, odt, html
  • xlsx => pdf
  • xls => pdf

Installation

It is recommended to install OfficeConverter through Composer.

Run this command within your project directory

composer require ncjoes/office-converter

Or add this line to your composer.json

{
	"ncjoes/office-converter": "0.1.*"
}

Dependencies

In order to use OfficeConverter, you need to install LibreOffice.

Usage

Here are some samples.

<?php
// if you are using composer, just use this
use NcJoes\OfficeConverter\OfficeConverter;

$converter = new OfficeConverter('test-file.docx');
$converter->convertTo('output-file.pdf'); //generates pdf file in same directory as test-file.docx
$converter->convertTo('output-file.html'); //generates html file in same directory as test-file.docx

//to specify output directory, specify it as the second argument to the constructor
$converter = new OfficeConverter('test-file.docx', 'path-to-outdir');
?>

License

The OfficeConverter package is open-sourced software licensed under the MIT license.

Feedback & Contribute

Notify me of any issues, bugs, or improvements. Thanks 👍

统计信息

  • 总下载量: 184
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-06