0

I have a script generating PDFs via PHP and I can output the results directly to the browser. Is there a way through PHP and possibly headers to make this output page automatically bring up the print dialog?

Somk
  • 11,869
  • 32
  • 97
  • 143
  • 1
    here is quite the same question http://stackoverflow.com/questions/13736534/open-printer-dialog-for-pdf-file-automatically – santik May 09 '14 at 08:52

1 Answers1

0

You can execute embeded JavaScript in a PHP document that gets executed when the PDF is opened. So, you could embed a print(); command to open the print dialog as soon as the PDF is opened.

I'm not sure how you're creating the PDF, but you could take a look at the suggestions HERE and see if that helps.

Community
  • 1
  • 1
SaxJ
  • 1