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

0

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

+7

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.

+1

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

+1

But if you want add a button check this link -> https://stackoverflow.com/questions/6896592/is-it-possible-to-save-html-page-as-pdf-using-javascript-or-jquery