转换PDF以在任何浏览器中查看 [英] Converting PDFs to be viewed in any browser

查看:109
本文介绍了转换PDF以在任何浏览器中查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用PDF到Flash,以允许用户翻阅上载PDF的页面.但是,由于使用iPhone/iPad的人众多,我想将其切换为适用于任何浏览器的解决方案.

I currently use a PDF-to-Flash to allow for users to flip thru pages of uploaded PDFs. However, with so many using iPhones/iPads I would like to switch this to a solution which works with any browser.

该网站是用Ruby on Rails开发的,我已经研究过使用pdf-toolkit和rmagick将PDF转换为图像,但是这还不够,因为我希望页面可以随浏览器窗口缩放-自SVG以来,这不是一个选择我需要它才能与IE6配合使用;)

The site is developed in Ruby on Rails and I have looked into using pdf-toolkit and rmagick to convert the PDFs to images but it's not enough since I want the pages to scale with the browser window - SVG is not an option since I need for it to work w/ IE6 ;)

有什么想法吗?

Thx,

G

推荐答案

为什么不使用 http://docs.google.com/viewer 吗?

http://googlesystem.blogspot.com/2009 /09/embeddable-google-document-viewer.html

这真的很简单,它不是Flash(也可以为iPhone用户提供服务:D).只需将其添加到视图中即可:

It's really simple, and it isn't Flash (can serve iPhone users too :D). Just add this to the view:

<iframe src="http://docs.google.com/viewer?url=#{YOUR_PDF_URL}&embedded=true"
style="width:600px; height:500px;" frameborder="0"></iframe> 

这篇关于转换PDF以在任何浏览器中查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆