Printing an External PDF File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • helimeef
    New Member
    • Sep 2007
    • 77

    Printing an External PDF File

    Hey all,

    I have a project that I'm working on where I need to print a PDF file on the fly. I was wondering if there was a way to print an external file when the user clicks on a link? I've tried loading the file into an IFRAME, using pop-ups and closing them, and several other methods.

    What the goal actually is that a PHP script I wrote will merge 4-5 PDFs on the fly, and then disguise itself as a PDF file. I want the JavaScript to call on this file, and instruct the browser to print it.

    What is the simplest way I can accomplish this?
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    you cannot directly print a pdf-file from a webpage ... the best way would be to open it in a window/iframe and then let the user decide to print or save it. you could even force a download by setting the content-disposition header ... in case you want to do it that way?

    kind regards

    Comment

    Working...