Answer the question
In order to leave comments, you need to log in
How to save form data to PDF and paste them in the right places in this file in php?
there is a form where we fill in the fields, after we collect all this data, how to send them and save them in the right lines in a pdf file and then download it? Tell me please
Answer the question
In order to leave comments, you need to log in
function makePdf($filename) {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$wkhtmltopdf = '"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe"';
} else {
$wkhtmltopdf = '/usr/local/bin/wkhtmltopdf';
}
$make = "$wkhtmltopdf $filename.html $filename.pdf";
shell_exec($make);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question