Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

PHP wrapper over Unoconv

Notifications You must be signed in to change notification settings

NIT-Administrative-Systems/SysDev-unoconv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP wrapper over Unoconv Build Status

Note: We folded this into the repo that needed it to simplify upgrades, so this package is now deprecated.

Simple way for documents conversion into various formats.

For example: html -> docx, html -> pdf, docx -> html and many more.

More about supported formats.

🚨 This fork will use whatever symfony/process package that the latest Laravel is using. We'll try to keep the other deps up-to-date.

Usage

use Mnvx\Unoconv\Converter;
use Mnvx\Unoconv\UnoconvParameters;
use Mnvx\Unoconv\Format;

// Create converter
$converter = new Converter();

// Describe parameters for converter
$parameters = (new UnoconvParameters())
    // HTML document as string on input
    ->setInputStream('<!DOCTYPE html><html>Example of HTML document</html>')
    // Result file name
    ->setOutputFile('path-to-result-docx.docx')
    // Format of result document is docx
    ->setOutputFormat(Format::FORMAT_TEXT_DOCX);

// Run converter
$converter->convert($parameters);

Install

sudo apt-get install unoconv
composer require northwestern-sysdev/unoconv

If you have problems with Unoconv utility, read instructions descibed in official documentation.

License

Released under the MIT license

Credits

Originally forked from mnvx/unoconv -- thanks mnvx!

About

PHP wrapper over Unoconv

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%