当我链接到web表单中的pdf文件时,acrobat阅读器会处理它的加载。但我需要一个activex对象或客户端脚本来显示pdf文件,而不是acrobat阅读器软件。我找不到任何东西(我需要它完全免费,而不是试用版)。
有人能帮上忙吗?
发布于 2012-01-26 16:54:31
你可以使用像Google Books或Google Docs这样的3rt party API。
Scribd还提供了一个应用程序接口。
发布于 2012-01-26 17:02:22
为了将pdf渲染添加到firefox中,他们将纯javascript pdf渲染器pdf.js (about,source)放在了一起。
这可能是一个可能的选择。
发布于 2012-01-30 16:00:08
我已经做了这个google文档查看器
$(function(){
var links = $("a.pdf,a.doc,a.xls");
var docs = links.attr("href");
var gog = "&embedded=true";
var polurl = window.location.hostname;
var baseurl = "http://docs.google.com/gview?url="+polurl+'/';
$(links).click(function(e){
var conents = $('<iframe id="helpmeplease" src="'+baseurl+encodeURIComponent($(this).attr('href'))+gog+'" style="width:900px; height:800px;" frameborder="0"></iframe>')
$('#helpmeplease').attr('src',baseurl+encodeURIComponent($(this).attr('href'))+gog)
$.fancybox({
'content' :conents,
'width' : 1000,
'height' : 800,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
})
e.preventDefault()
});
});希望这能有所帮助
https://stackoverflow.com/questions/9015693
复制相似问题