PHP Excel/PDF Generating
PHPMake PDF Files Using FPDF
FPDF is a ready complex binary format, that has many rules and structure. PHP itself does not have a built-in PDF generator and making one by yourself would be a time-taking work, so that's why using third-party apps is the way:
This way, you can download a page's content and insert the info into a PDF file.
Excel Making with PhpSpreadsheet
The PHP Spreadsheet doesn't have its own website to download the package, instead you have to run a command in terminal to download it. Make sure you have the PHP Composer installed aswell. Lastly, we are not making this system from scratch, because the manual way would take you 5 hours to download all the dependencies, so that's why we are using the PhpSpreadsheet system:
Make sure the include directories match where your package's files are or make the URLs by yourself.