1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Print the contents of the linked page.

Discussion in 'Programming' started by rob7676, Feb 24, 2012.

  1. #1
    I am setting up a page that will display a list of .pdf files stored in the database. I would like to have a button on the list page for each document that will allow the user to print the .pdf without having to open it. Is this possible? If so, can someone guide me through this?

    Thanks
    Rob
     
    rob7676, Feb 24, 2012 IP
  2. trendint

    trendint Peon

    Messages:
    52
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Unfortunately this isn't possible - PDF's aren't web content and require a third party application/plugin for interpreting the content for viewing as well as printing. Without having the PDF file loaded in some way, you wouldn't be able to print it. A possible work around would be to load the PDF file in a hidden iframe and call the print functionality via JavaScript, however I don't know how cross-browser compatibility would be.
     
    trendint, Feb 28, 2012 IP