PHP code example of phuonght / converter-document
1. Go to this page and download the library: Download phuonght/converter-document 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/ */
phuonght / converter-document example snippets
$converter = new \Colombo\Converters\Helpers\Converter();
$converter->setInput($input);
// force custom converter
$converter->setOutputFormat( 'pdf');
$converter->setEndPage(1);
$converter->setEndPage(2);
$result = $converter->run();
if($result->isSuccess()){
$result->saveTo('xxx.pdf');
}else{
print_r($result->getErrors());
}