Save as PDF button | Sololearn: Learn to code for FREE!


Save as PDF button

Hello, I am a beginner of web developing. could you please help me. How do I set a button to save my web page as a 'PDF' file? Could you please help me with commenting some example code(html/css/js/php) or links? Thank you all.

1/18/2018 5:07:28 AM

Hein Soe

3 Answers

New Answer


I don't know much about web, but I do know that you can upload a PDF version of your page to a source, and then link the source to your button so it downloads from the source. Not sure if JS has a built-in function to directly convert whatever you have to pdf and just place it right in front of you.


Easiest way without doing anything -> open browser -> open your webpage -> goto options (3 dot icon in your browser) ->(If on PC) Print (else If on android phone using chrome) share -> print / save as PDF


But if you want add a button check this link ->