Forums

Easy FancyBox
[resolved] Error with FancyBox PDF in Safari (4 posts)

  1. JonManness
    Member
    Posted 4 months ago #

    In Safari (5.1.2 for OS X 10.6.8), when I click on the PDF link for the first time, the PDF overlay shows up perfectly. However, if I close the PDF and click on the link again, the PDF doesn't show at all. I have to refresh the browser in order to view the PDF overlay again.

    Is there anything I could do to fix the PDF loading in Safari? Chrome works perfectly and Firefox says "plugin needed..." but I know it's because Firefox doesn't have a PDF viewer.

    Here's a link to see what I'm talking about (scroll to "Sample Page of Score" and click on PDF: http://www.jonathanmanness.com/music/finding-you-for-jazz-band

    Here is the code just in case I wrote it wrong:

    <a class="fancybox-pdf" href="http://www.jonathanmanness.com/wp-content/uploads/2012/01/Finding-You-Sample.pdf">View PDF</a>

    Thank you for your help! I know this plugin is gonna work out great for my website!

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Posted 4 months ago #

    It's a know issue with the PDF plugin in Safari. You could try to use the class "fancybox-iframe" (and disable autodetect for PDFs!) to see if that works better for Safari. See my teste page on this subject on http://demo.4visions.nl/easy-fancybox-sandbox/pdf-embeds/ and try those link at the start of the post.

    Also, could you tell me if the FIRST embedded PDF file shows in Safari on http://demo.4visions.nl/easy-fancybox-sandbox/pdf-type-o/ ?

  3. JonManness
    Member
    Posted 4 months ago #

    Thank you! The solution that worked best for me was "Open in iFrame with Google Docs Viewer." This method works the same in Chrome, Safari, and Firefox, and I don't have to worry which browser the enduser is using.

    For anyone who's interested in the code, activate iframe and write the code like this:

    <a class="fancybox-iframe" href="http://docs.google.com/gview?url=http://LINKTOPDF.pdf&embedded=true">LINK</a>

    I also set the iFrame Width to 85% and Height to 100% in the media settings.

    As for your question, RavanH, I could not view the first embedded PDF in Safari. It said "Missing Plug-in" and redirected me to download Adobe Reader X, which I don't use. I'd say that everyone's best bet is to use iFrame with Google Docs Viewer.

  4. RavanH
    Member
    Posted 4 months ago #

    Thanks for sharing Jon :)

Reply

You must log in to post.

About this Plugin

About this Topic