I am trying to use mPDF to convert a site into PDF.
The thing is that my site is a PHP variable page, which displays information for customers depending on their username and order ID. However, the website name is always the same: personalArea.php.
So, I would like to have a link that says Export to PDF, so the user exports his information.
I am planning on using file_put_contents to put the current page into a HTML file and then use the mPDF to export that HTML into PDF. Is this a good practice? My concern is the volume, I would be creating many HTMLs... I could delete them immediately, but not sure if there is a better way to do this.
Thanks