2

Please help, I've been looking for hours but I can't find a definitive answer... On my web app a jQuery dialog pops up with a PDF loaded within an iframe. If possible I need the user to be able to click the "print" button (on jQuery UI modal dialog) which then brings up the Adobe Reader print dialog for them to print the PDF. I know they can hover over the PDF to show the toolbar but this is not always ideal for the computer illiterate. Tried the usual things like window.print() etc and also looking into PDF "open parameters" to no avail.

http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

I've also tried embedding the PDF and using window.print() and print preview but the PDF doesn't show on the preview screen.

superjaz1
  • 436
  • 4
  • 11
  • This may help: http://stackoverflow.com/questions/6167995/generate-a-pdf-that-automatically-prints/6168091#6168091 – yms Jul 12 '12 at 13:28
  • Thanks, I've tried this one, I keep getting an error "print is not a function" – superjaz1 Jul 12 '12 at 14:01
  • It does not work in all combinations of browsers and PDF readers... – yms Jul 12 '12 at 14:10
  • Hmm seems that it work on IE but not FF, Chrome etc. Still looking..... – superjaz1 Jul 12 '12 at 15:16
  • It's messy and possibly a strain on the server, but for now when the user clicks "print" I'm going to reload the PDF into the iframe with Javascript embedded into the PDF to open the print dialog hehe – superjaz1 Jul 12 '12 at 15:23
  • 1
    If you are going to do that then at least try using linearized pdfs. – yms Jul 12 '12 at 15:29

0 Answers0