Reputation: 168081
I am trying to embed a pdf into html using <object>
.
<object data="file.pdf#scrollbar=0&;view=Fit"
type="application/pdf"
style="width:100%;height:4000px"></object>
I want it to display it a single page at a time, fitting into the window. But it appears continuously with the vertical scrollbar. How can I fix it?
height:100%
does not seem to work (to expand enough height), and I needed to put some large number there.
I checked that the scroll bar is part of the <object>
where pdf is rendered, not any DOM objects surrounding it.
I use Chrome browser.
Upvotes: 2
Views: 6692
Reputation: 82734
It seems you cannot control that. You can't, by the way, control, that Acrobat (or whatever the default PDF viewer is) takes over the content of the iFrame. For example, I've configured my browser to download all PDFs.
(By the way, linking to a certain page with page=n
seems to display the page start at about 1/3rd of the top edge.)
There are alternatives. You can google for PDF to Flash converters/viewers, or you try out pdf.js for a no-plugin setup.
Upvotes: 2