Scroll PDF embedded in HTML
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.
You can read PDF Open Parameters.
Briefly you create an <object>
tag such as <object type="application/pdf" data="file1.pdf" width="500" height="650" ></object>
and you pass the parameters like file1.pdf#toolbar=0 &scrollbar=0
. You can manage the up-down with links or images with html.
精彩评论