0

Web ページにリンクされた N ページの PDF があります。

次と前の矢印、ページ番号などを使用して PDF を閲覧できるようにしたい

Flash プラグインを使用せずに PDF を閲覧できるようにしたいと考えています。

また、ブラウジング動作を正規化したいので、ブラウザのデフォルトの PDF プラグインを使用したくありません。

JS プラグインを探していますが、興味深い解決策が見つかりません。

他の提案はありますか?

4

1 に答える 1

1

You can try this way:

See my code below:

 $("a[href*=.pdf]").click(function(){
    window.open(this.href);
    return false;
});

Alternatively, you can apply the target="_self" attribute instead:

 $("a[href*=.pdf]").click(function(){
    $(this).attr({"target":"_self"});
    return false;
});

EDIT:

If you need a plugin here it is https://github.com/andreasgal/pdf.js

Demo for the plugin http://deanhume.com/content/postimages/pdfjs/pdfjs.htm#1

于 2012-04-30T09:05:29.977 に答える