SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question print pdf button script

    Can anyone tell me if this is possible please and how I'd go about doing it.

    I've got a button which links to a pdf. Once clicked the pdf tries to download onto the users computer. What I'd like to happen instead is for the pdf to print instead of trying to download. Is there a way of doing this?

    Thanks for any help in advance

  2. #2
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There might be a javascript function for this, although it is complicated by the fact that pdf is a whole new file which needs to be opened.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,600
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    That isn't something you can control from the web page. A web page has no way to print anything other than the current page and has no way to tell what printers may be available.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •