I want to download this page into pdf after clicking download button.
Asked
Active
Viewed 112 times
-9

Erazihel
- 7,295
- 6
- 30
- 53
-
Please see [How to Ask](https://stackoverflow.com/help/how-to-ask) – bhansa Jul 17 '17 at 12:35
-
[html2pdf](https://www.html2pdf.fr/) try this – Masivuye Cokile Jul 17 '17 at 12:40
-
Possible duplicate of [Convert HTML + CSS to PDF with PHP?](https://stackoverflow.com/questions/391005/convert-html-css-to-pdf-with-php) – Masivuye Cokile Jul 17 '17 at 12:42
1 Answers
2
You can use the following anchor tag:
<a href="/home.php" download="home-downloaded.pdf">Download Home as pdf</a>

halfer
- 19,824
- 17
- 99
- 186

Kamga Simo Junior
- 1,679
- 2
- 16
- 30
-
-
When the page is loaded, all the php codes are converted to html. SO when you click on the link, the html are being saved as a pdf file. – Kamga Simo Junior Jul 17 '17 at 12:55