滚动嵌入在HTML中的PDF [英] Scroll PDF embedded in HTML

查看:128
本文介绍了滚动嵌入在HTML中的PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iframe中嵌入了PDF文件。我的html文件有按钮上,下。当我点击这些按钮时,我想让pdf向上或向下滚动。

有没有办法通过javascript或其他方式控制pdf。我将为此应用程序和Acrobat pdf阅读器使用Internet Explorer6。

解决方案

几乎没有。



em>能够做到的是将 iframe 放入 div 中,其中 overflow:auto ,并给iframe一个非常大的高度值,所以包含的PDF是全尺寸的。使周围的 div 小于iframe。当你的按钮被点击时,滚动周围的div。



我没有测试过,所以可能会有一些障碍,但这可能会奏效 - 你可以做的最好的。


I have embedded a PDF file in Iframe. My html file has buttons "UP", "DOWN". When I click on these buttons, I want the pdf to scroll up or down.

Is there a way to control the pdf with javascript or any other way. I will be using Internet Explorer6 for this application and Acrobat pdf reader.

解决方案

Hardly.

What you might be able to do is to put the iframe into a div with overflow: auto, and give the iframe a very large height value so the containing PDF is at full size. Make the surrounding div less tall than the iframe. When your buttons get clicked, scroll the surrounding div.

I haven't tested it so there may be some snag on the way, but this could work - and is probably the best you can do.

这篇关于滚动嵌入在HTML中的PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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