duanqian6982 2011-09-06 11:28
浏览 26
已采纳

如何在没有Flash / Adob​​e的PHP网站上显示PDF

I am not satisfied with the browsers internal behaviour of displaying PDFs. I would like to provide my users with an easy yet stylish PDF viewing experience on my sites. Something like Scribd, but managable and unter full security and control on my server.

I could provide inline links to GoogleDocsViewer or ZohoViewer. Or convert the PDF right after its upload with SWFTools and show the swf with native PHP or HTML5.

Anyway, somehow, after hours of reading and thinking, I am just not happy with any of the above approaches.

Any suggestions?

  • 写回答

2条回答 默认 最新

  • doushi1912 2011-09-06 11:41
    关注

    Take a look at Google Docs Viewer. The following code will help you (untested):

    <iframe src="http://docs.google.com/gview?embedded=true&url=PDF-URL" style="width:600px; height:500px;" frameborder="0"></iframe>
    

    Update 13.09.2016: Google removed their generator. Even though, you can still use the viewer by appending the escaped document-url to the url above manually.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题