HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/selfanalyse/emu-aptitude-test/pdf.php
<?php


$test = $_REQUEST['test'];

require_once '/var/www/selfanalyse/dompdf/autoload.inc.php';

use Dompdf\Dompdf;
use Dompdf\Options; 
use Dompdf\FontMetrics; 

// Set options to enable embedded PHP 
$options = new Options(); 
$options->set('isPhpEnabled', 'true'); 

$dompdf = new Dompdf($options);

if ($test != '' && is_numeric($test) && strlen($test) <= 5) {
    $file = "/var/www/selfanalyse/emu-aptitude-test/pdf-html/pdf-" . $test . ".html";

    $html = file_get_contents($file);
    $dompdf->loadHtml($html);

    // (Optional) Setup the paper size and orientation 
    $dompdf->setPaper('A4', 'portrait');

    // Render the HTML as PDF 
    $dompdf->render();
    $dompdf->add_info('Title', 'EMU Aptitude Test | Downlaod Report - ThinkEmu');
    $dompdf->stream("EMU Aptitude Test Report", array("Attachment" => 0));
}