• Resolved kilzac

    (@kilzac)


    Hi,

    Is it possible to open a PDF file with a specific page anchor in the Fancybox pop-up? i.e. opening abc.pdf#page=3 directly through hyperlink, without Fancybox, will take the visitor directly to page 3 of the PDF file.

    However this does not happen using Fancybox and it will only show the default first page of the PDF.

    https://wordpress.org/plugins/easy-fancybox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, the next version will be supporting this but for now, what you can do is:

    1. Disable the option “Enable for: PDF” and enable the option “Enable for: iFrame” (if you need the PDF feature for many other links, see note below)
    2. Modify the link in your post (via HTML tab) or text widget so that is has a class="fancybox-iframe" attribute and append the href with #page=3

    The link HTML source should look something like:

    <a href="...pdf#page=3" class="fancybox-iframe">...text or img...</a>

    Note: if you have many other PDF links accros your site and you really need the PDF feature enabled with the auto-detection ON, then leave it enabled and add the class nofancybox to the PDF link that you want to make open on page 3. It should look like:

    <a href="...pdf#page=3" class="nofancybox fancybox-iframe">...text or img...</a>

    Hope that helps 🙂

    Thread Starter kilzac

    (@kilzac)

    Wow, thanks for that. it works very well. would love to see it implemented directly for PDFs in the next version 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Opening PDF with specific page anchor’ is closed to new replies.