public function generatePDF() {
        $dompdf = new \DOMPDF();
        $html = $this->generateHTML();
        $dompdf->load_html($html);

        $dompdf->render();
        $pdfStream = $dompdf->output();
        return $pdfStream;
    }