开发者

Anchor link PDF work around

In IE currently anchor linking to a section on a PDF only works if the PDF in question is cached or has been downloaded recently on the user's computer.

Example

User clicks anchor link to pdf f开发者_运维知识库irst time 
    PDF loads at the beginning of document
User goes back to website and clicks link again
    PDF loads at anchor linked position

Does anyone know of a work around in which the PDF will load at the desired position upon first clicking the link?

Note that the anchor links are of the type #page=200 and fit these guidelines http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf


Here is my current solution, while not perfect it works.

<div class="hidden" id="iframes"></div> //-- hidden div at bottom of page 

$(function() {
    var urls = ["url one", "url two", "etc..."];
    $(urls).each(function(index, url) {
        var iframe = $("<iframe />").attr({ src: url });
        $("#iframes").append(iframe);
    });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜