I am trying to create a PDF file from a HTML for which I am using npm html-pdf package. When I am trying to run this command from terminal
html-pdf ticket-2.html ticketpdf.pdf
its working fine and PDF is creating successfully.But when I am trying to run this command from a PHP file then its showing this error sh: html-pdf: command not found.
$ret = exec("html-pdf ticket-2.html ticketpdf.pdf", $out, $err);
print_r($out);
Output: Array ( [0] => sh: html-pdf: command not found )
Can anyone help me on this where this issue is exactly?
Thanks in advance