I have a bdc.php file which generate a .PDF file with fpdf.
It is working well when the user click on the link but i would like to force the PDF creation when the page is displayed (even if the link is not clicked)
bdc.php retrieve a value named $rid to fill the PDF according to the database.
The code below works : generate PDF, download, and store it on the server :
<a href="bdc.php?rid=<?php echo $rid ; ?>" download><span><img src="./images/icon-pdf.png"></span></a>
Exec does not work even with forced value or variable :
exec ('php bdc.php rid="2055381354"');
exec ('php bdc.php rid=.$rid.');
The PDF generate well until the $rid is reached and is blank below
Could you please help me to solve this ?
Regards.