PHP code example of eurechasherij / office-converter-windows
1. Go to this page and download the library: Download eurechasherij/office-converter-windows library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eurechasherij / office-converter-windows example snippets
// if you are using composer, just use this
use EurechaSherij\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');