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/interest-test/pdf.php
<?php



$test = $_REQUEST['test'];

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

use Dompdf\Dompdf;

$dompdf = new Dompdf();

if ($test != '' && is_numeric($test) && strlen($test) <= 5) {
    $file = "/var/www/selfanalyse/interest-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();

    // Output the generated PDF (1 = download and 0 = preview) 
    $dompdf->stream("Interest Test Report", array("Attachment" => 0));
}