<?php
require_once __DIR__ . '/vendor/autoload.php';

use Dompdf\Dompdf;
use Dompdf\Options;

$options = new Options();
$options->set('isRemoteEnabled', true);

$dompdf = new Dompdf($options);

$img = __DIR__ . '/assets/rs_logo.png';

$html = "<h2>Image Test</h2><img src='$img' width='200'>";

$dompdf->loadHtml($html);
$dompdf->render();
$dompdf->stream("image_test.pdf", ["Attachment"=>false]);
