require '../vendor/autoload.php';
require_once '../vendor/dompdf/dompdf/autoload.inc.php';
use Dompdf\Dompdf;
// instantiate and use the dompdf class
$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');
// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');
// Render the HTML as PDF
$dompdf->render();
// Get the generated PDF file contents
$pdf = $dompdf->output();
// Output the generated PDF to Browser
$dompdf->stream();
When I run the php page, appears two errors:
Warning: require_once(C:\wamp\www\ejemplocomposer\vendor\dompdf\dompdf/lib/php-font-lib/src/FontLib/Autoloader.php): failed to open stream: No such file or directory in C:\wamp\www\ejemplocomposer\vendor\dompdf\dompdf\autoload.inc.php on line 20
Fatal error: require_once(): Failed opening required 'C:\wamp\www\ejemplocomposer\vendor\dompdf\dompdf/lib/php-font-lib/src/FontLib/Autoloader.php' (include_path='.;C:\php\pear') in C:\wamp\www\ejemplocomposer\vendor\dompdf\dompdf\autoload.inc.php on line 20
I've been searching, but I'm confused, It's necessary modify the sentences require in the top of index.php file?
Thanks in advance.
--
Gustavo