```php
<?php
session_start();

require_once __DIR__.'/dompdf/vendor/autoload.php';

use Dompdf\Dompdf;

$data_start=$_POST["data_start"];
$data_stop=$_POST["data_stop"];

$img_cloro=$_POST["img_cloro"];
$img_ph=$_POST["img_ph"];
$img_temp=$_POST["img_temp"];
$img_cl_comb=$_POST["img_cl_comb"]??"";
$img_redox=$_POST["img_redox"]??"";

$NOME_Impianto=$_SESSION['NOME_Impianto'];
$nvasca=$_SESSION['nvasca'];
$Analisi35=$_SESSION['Analisi35'];

$Full=($Analisi35==0)?1:0;

$start=DateTime::createFromFormat('d/m/Y',$data_start);
$stop=DateTime::createFromFormat('d/m/Y',$data_stop);
$stop->modify('+1 day');

$periodo=new DatePeriod($start,new DateInterval('P1D'),$stop);

$tableRows=[];

foreach($periodo as $data_corrente){

$giorno=$data_corrente->format("d");
$mese=$data_corrente->format("m");
$anno=$data_corrente->format("Y");

$PIP300=str_pad($_SESSION['PIP300'],6,'0',STR_PAD_LEFT);
$Matricola_CALL=str_pad($_SESSION['Matricola_CALL'],2,'0',STR_PAD_LEFT);
$ADDR_V=str_pad($_SESSION['ADDR_V'],2,'0',STR_PAD_LEFT);

$file="C:\\xampp\\htdocs\\archivi\\$anno\\$mese\\{$PIP300}_{$Matricola_CALL}_{$ADDR_V}_{$giorno}{$mese}{$anno}.CSV";

if(!file_exists($file)) continue;

$handle=fopen($file,"r");

while(($row=fgetcsv($handle,1000,";"))!==FALSE){

$tableRows[]=[
"$giorno/$mese/$anno",
$row[0],
$row[1],
$row[2],
$row[3],
$row[4]??"",
$row[5]??""
];

}

fclose($handle);

}

$html="

<style>

body{font-family:Arial;}

.page-break{page-break-after:always;}

.logo{text-align:center;margin-bottom:20px;}

table{width:100%;border-collapse:collapse;}

td,th{border:1px solid black;padding:4px;text-align:center;}

</style>

<div class='logo'>
<img src='".__DIR__."/LogoAQC.png' width='200'>
</div>

<h1 style='text-align:center'>Report Analisi Piscina</h1>

<p><b>Impianto:</b> $NOME_Impianto</p>
<p><b>Vasca:</b> $nvasca</p>
<p><b>Periodo:</b> $data_start - $data_stop</p>

<div class='page-break'></div>

<h2>Cloro libero</h2>
<img src='$img_cloro' width='700'>

<div class='page-break'></div>

<h2>pH</h2>
<img src='$img_ph' width='700'>

<div class='page-break'></div>

<h2>Temperatura</h2>
<img src='$img_temp' width='700'
";

if($Full){

$html.="

<div class='page-break'></div>

<h2>Cloro combinato</h2>
<img src='$img_cl_comb' width='700'>

<div class='page-break'></div>

<h2>Redox</h2>
<img src='$img_redox' width='700'

";

}

$html.="

<div class='page-break'></div>

<h2>Tabella dati</h2>

<table>

<tr>

<th>Data</th>
<th>Ora</th>
<th>Cloro</th>
<th>pH</th>
<th>Temp</th>

";

if($Full){

$html.="<th>Cl combinato</th><th>Redox</th>";

}

$html.="</tr>";

foreach($tableRows as $r){

$html.="<tr>";

for($i=0;$i<($Full?7:5);$i++)
$html.="<td>".$r[$i]."</td>";

$html.="</tr>";

}

$html.="</table>";

$dompdf=new Dompdf();

$dompdf->loadHtml($html);

$dompdf->setPaper('A4','portrait');

$dompdf->render();

$impianto=preg_replace('/[^A-Za-z0-9]/','_', $NOME_Impianto);
$vasca=preg_replace('/[^A-Za-z0-9]/','_', $nvasca);

$nomeFile=$impianto."_".$vasca."_".$start->format("Y-m-d")."_".$stop->format("Y-m-d").".pdf";

$dompdf->stream($nomeFile,["Attachment"=>1]);

?>
```
