I want to download this page into pdf after clicking download button.
Asked
Active
Viewed 102 times
-9
Erazihel
- 6,815
- 5
- 28
- 51
-
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,471
- 17
- 87
- 173
Kamga Simo Junior
- 1,529
- 2
- 13
- 29
-
-
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