Firefox中的Fancybox PDF问题

gre*_*row 5 pdf firefox popup fancybox

我设置了Fancybox,这样当用户点击pdf链接时,它会弹出一个pdf,但是在Firefox中它会询问您是要保存还是打开文件,我不想这样做.如何强制pdf显示在fancybox弹出窗口中?它适用于Safari.

<a class="pdf" href="http://www.test.co.u.uk/test.pdf">test.pdf</a>

$(".pdf").fancybox({
   'width' : '700',
   'height' : '700',
   'autoScale' : true,
   'transitionIn' : 'none',
   'transitionOut' : 'none',
   'type' : 'iframe'
});
Run Code Online (Sandbox Code Playgroud)

Mot*_*tie 2

就我个人而言,我只会使用 Google Docs 在 iframe 中显示 PDF。它会自动调整 PDF 的大小以匹配 iframe 尺寸。这是要使用的格式:

<iframe src="http://docs.google.com/gview?url=http://samplepdf.com/sample.pdf&embedded=true" style="width:100%; height:100%;" frameborder="0"></iframe>
Run Code Online (Sandbox Code Playgroud)

您不需要 flash 或任何其他插件。