Use this code to make pdf file from html content.
$html = "put your html code here";
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper("a4", "portrait");
$dompdf->render();
$output = $dompdf->output();
file_put_contents('Otherfile.pdf', $output);
After using render() function use output() function to store pdf file in variable.
And put that content inside new file using file_put_contents(). Then use that file to put inside .zip using following code.
$files = 'Otherfile.pdf';
$zipname = 'zipname.zip';
$zip = new ZipArchive;
$zip->open($zipname, ZipArchive::OVERWRITE);
$zip->addFile($files);
$zip->close();
header('Content-Type: application/zip');
header("Content-Disposition: attachment; filename='".$zipname."'");
header("Pragma: no-cache");
header("Expires: 0");
header('Cache-Control: must-revalidate');
header('Content-Length: ' . filesize($zipname));