Print or Save the Web page as .PDF Using Java Script | 2my4edge

25 June 2013

Print or Save the Web page as .PDF Using Java Script

Save the web page as .PDF format or directly print the page using printer, we have to connect the printer through the computer and then choose the Designation where and what it should have to do the function, whether print or save the page. [ New one using JQUERY ]

DOWNLOAD                     LIVE DEMO

Here we are using the script for print the pages, and the script is

<script>
function doit(){
if (!window.print){
alert("You need NS4.x to use this print button!")
return
}
window.print()
}
</script>
<a href="javascript:doit()"><img src="icon-48-print.png" border=0 align="middle">


Sample print screen image


Like the above snap we have choose the designation of the printer or else save the page as PDF. CLICK HERE FOR SAMPLE DEMO




RELATED POSTS :


12 comments:

  1. will it work for saving my own webpage in an intranet environment to save as a pdf file?

    ReplyDelete
  2. what is this ? your code is dependent on the browser or client machine installed with print pdf...

    ReplyDelete
  3. Its good to save entire web page as pdf file

    ReplyDelete
  4. Its nice to save entire web page to save as pdf file

    ReplyDelete
  5. It is helpful to me . save full page as pdf

    ReplyDelete
  6. Thanks for the useful article.

    Following article also explains how to export in a pdf using jquery
    http://www.namasteui.com/download-html-as-pdf-using-javascript/

    ReplyDelete
  7. this is for print , and what if i have to save the web page as the prompt should be open to save the web page can someone help me

    ReplyDelete
  8. This is pretty good. Thanks for sharing this. I am doing this another way using mPDF for my website.

    ReplyDelete
  9. I really impressed after read this because of some quality work and informative thoughts . I just wanna say thanks for the writer and wish you all the best for coming!. website design companies

    ReplyDelete

^