I am trying to create PDF’s with Spatie Browsershots,
$html = view('components.pages.student.result.check', ['results' => $results, 'average' => $average, 'student' => $student])->render();
$pdf = Browsershot::html($html)->pdf();
return new Response($pdf, 200, [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'inline; filename="result.pdf"'
]);
but keep getting this error
The command “node “C:UsersHPDocumentsGitHubSchool_Management_appvendorspatiebrowsershotsrc/../bin/browser.cjs” “{“”url””:””file://C:UsersHPAppDataLocalTemp1925459280-0381687001715740509index.html””,””action””:””pdf””,””options””:{“”args””:[],””viewport””:{“”width””:800,””height””:600},””displayHeaderFooter””:false}}”” failed. Exit Code: 1(General error) Working directory: C:UsersHPDocumentsGitHubSchool_Management_apppublic Output: ================ Error Output: ================ ‘node’ is not recognized as an internal or external command, operable program or batch file.
Ive check and yes, Node is install, The pc env path points to the ndoe .exe