Hi, I am new to web development. I have a report (invoice) created in a blank with boostrap, php and html. I have created another Blank that executes the first blank sending the invoice to print. My idea is to take that output and convert it to PDF. I found in a video the use of the “wkhtmltopdf” program which is part of scriptcase and is supposed to allow it to be done. The truth is that I could not generate the PDF (it does not work for me and I do not know why.
My code is:
$ invoiceId = 51;
$ wkhtmltopdf = “C: / Users / ruben / Program Files / NetMake / v9-php73 / wwwroot / scriptcase / prod / third / wkhtmltopdf / win / wkhtmltopdf”;
$ application = “http://127.0.0.1:8091/scriptcase/app/tempus/blank_factura/index.php?facturaId=”.$facturaId;
$ invoice = “C: / Program Files / NetMake / v9-php73 / wwwroot / scriptcase / tmp / invoice _”. $ invoiceId. “. pdf”;
$ run = $ wkhtmltopdf. ’ ‘. $ application.’ '. $ invoice;
echo “wkhtmltopdf INFORMATION:”. $ wkhtmltopdf. “
”;
echo “application INFORMATION:”. $ application. “
”;
echo “INFO invoice:”. $ invoice. “
”;
echo “INFORMATION execution:”. $ execute. “
”;
$ exe = shell_exec ($ execute);
// Take the file and display it
header (‘Location:’. $ invoice);
If I run it through CMD it sends me the following message:
“It is not recognized as an internal or external command, program, or executable batch file.”
I found videos on the internet about the message and I can’t get it to execute.