public function createFromView($view, $filename, $inline = false)
    {
        $this->generateFilePaths();
        $this->generatePdf($view);

        $contentDisposition = $inline ? 'inline' : 'attachment';
        return (new BinaryFileResponse($this->pdfPath))
            ->setContentDisposition($contentDisposition, $filename)
            ->deleteFileAfterSend(true);
    }