PHP code example of ibnuhalimm / laravel-pdf-to-html
1. Go to this page and download the library: Download ibnuhalimm/laravel-pdf-to-html 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/ */
ibnuhalimm / laravel-pdf-to-html example snippets
use Ibnuhalimm\LaravelPdfToHtml\Facades\PdfToHtml;
$sourceFile = '/path/to/your-file.pdf';
PdfToHtml::setFile($sourceFile)->result();
// It will return output file path
// e.g. : /var/www/html/storage/app/pdf-to-html/your-file.html
use Ibnuhalimm\LaravelPdfToHtml\Facades\PdfToHtml;
$sourceFile = '/path/to/your-file.pdf';
PdfToHtml::setFile($sourceFile)
->saveAs('result-file')
->result();
// It will return output file path as
// e.g. : /var/www/html/storage/app/pdf-to-html/result-file.html