Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi, when viewing a PDF in a browser you need a browser plugin. Most mobile devices do not have such a plugin. However, you can use a work-around:

    1. Switch off the PDF option and enable the iframe option on your Settings>Media admin page
    2. Give you PDF file link a class="fancybox-iframe" attribute.

    For the last step, you might need to switch to the Text tab in the post editor, find the link and make it look like this:
    <a href="....pdf" class="fancybox-iframe">my pdf</a>

    This way, a mobile browser without plugin will download the file and open it in a PDF app ( if there is one)

    Thread Starter Trac77

    (@trac77)

    hi,
    Thanks for your reply
    Not sure how and where to add a class to link.
    Can you put here some expample?

    Thread Starter Trac77

    (@trac77)

    ok i just missed some of your last pointing.
    I disabled PDF, enabled iframe in the settings, than dropred this code as you mentioned:
    <a href="....pdf">my pdf</a> (with my pdf link) and tried it, so it opens right on the desktop but it still opens as a blank on the mobile.

    Please make sure it has that class=”fancybox-iframe” in there, like:

    <a href="....pdf" class="fancybox-iframe">my pdf</a>

    If you can share a link to your site, I can take a look.

    Thread Starter Trac77

    (@trac77)

    Hi, can i send you it on some email?

    Sure, you can use the contact form on status301.net

    OK got the link via e-mail and tested on an Android phone. Tapping the pdf link makes it download the file. It should then be possible to open it up in a PDF viewer app… this is the best that is possible on a device with browser that does not render PDF files.

    Thread Starter Trac77

    (@trac77)

    Ok, it works on that way. Thank you.

    Hello

    This is the actual solution?

    Hi Prixer, in the latest version you can choose the embed method. go to Settings > Media and under the PDF section set it to “iFrame”. No need to do anything complicated…

    Hello Ravan

    Tried it on chrome on android
    this causes blank image and auto PDF download

    Yes that is to be expected. When the browser does not have a PDF viewer plugin, it will download the file instead of rendering it in the iframe…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘PDF On mobile not showing content’ is closed to new replies.