I have a problem to generate PDF file using FPDF and PHP.
I'll not ask you how to create the pdf file, but I need help to generate a link to PDF file so it can be downloaded automatically.
I mean like this:
I already created a php page that create PDF file, name: report.php. I must open the report.php page to see the pdf file then click "Save" or press Ctrl + S to save the PDF file. Now I need to generate report.php become report.pdf automatically so the pdf file can be downloaded automatically.
For example, if I click a button "Generate Link", so the value will be:
echo "<a href='report.pdf' title='download pdf file'>Download PDF File</a>";
echo "<a href='report.php' title='download pdf file'>Download PDF File</a>";
Do you have any ideas or solution for this case?
I really appreciate it.