0

I want to use simple popover to display our privacy policy. For reasons beyond my control the client insists that it be a PDF. Okay.

The problem is that the following code only works in Chrome. The latest versions of Firefox and IE11 won't open it properly. (The overlay and loading animation appear but no popup border and PDF. And worse, in IE11 it prompts for download or open.)

Here's the HTML:

<a class="fancybox" href="http://blnwb.co/pdf.pdf">Popup</a>

Here's the JavaScript:

  $(document).ready(function () {
    $(".fancybox").fancybox({
      type: 'iframe'
    });
  });

JSFiddle: http://jsfiddle.net/LP7bq/

NOTE: I've seen the suggestions to use Google Docs to display the PDF in an iframe. Again that won't fly with the client. They insist on hosting all the .js period. No CDN, etc.

NOTE 2: I've also seen this old answer which also doesn't work in IE11.

Community
  • 1
  • 1
Doug Wilson
  • 4,185
  • 3
  • 30
  • 35
  • Try disabling iframe preload. Check http://stackoverflow.com/a/14828632/1055987 here your tweaked [jsfiddle](http://jsfiddle.net/JVn3C/) – JFK May 27 '14 at 05:08
  • Thanks. I know it should be a separate question, but how about asking to open or save the PDF instead of displaying it in the popup? – Doug Wilson May 27 '14 at 13:58
  • do you have adobe reader plugin for IE? http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html – JFK May 27 '14 at 15:25

0 Answers0