filename(); $pdf_path = ReportStorage::customFilepath($this->study, $filename); if (ReportStorage::exists($this->study, $filename)) { return $pdf_path; } $docx_path = ReportStorage::customFilepath($this->study, $this->filename('docx')); $docx = $this->renderDocument(); $docx->createDocx(ReportStorage::abspath($docx_path)); $docx->transformDocument(ReportStorage::abspath($docx_path), ReportStorage::abspath($pdf_path)); return $pdf_path; /* $dompdf = new Dompdf\Dompdf; $transform = new TransformDocAdvNative; $transform->transformDocument('document.docx', 'document.pdf', ['dompdf' => $dompdf]); $data = ['report' => $this->report, 'title' => 'PDF VIEW']; Pdf::loadView('staff.reports.viewer.html-report', $data) ->setPaper('a4', 'landscape') ->setWarnings(false) ->setOption('defaultFont', 'Courier') ->save(ReportStorage::abspath($pdf_path)); */ } protected function getExtension(): string { return ExportFormat::Pdf->value; } }