I am building a page that will display a PDF file on the page. When viewing this page in Chrome, the zoom level is set by default so that the document is wider and taller th
Adding a late answer since none of the existing ones worked for me, and someone might need it.
Instead of adding '#view=fitH' or '#view=fitV' to the pdf url, which didn't work for me, i got it working by adding '#zoom=scale', like this:
<object data="/path/to/file.pdf#zoom=scale" type="application/pdf">
</object>
Hope this helps someone, and sorry for any inconvenience.
EDIT: Found more parameters here. Found the link in this thread, which is basically the same question as this.
See demo here http://jsfiddle.net/6TNrw/68/
The above works if the pdf viewer object is adobe.
Google chrome has its own pdf viewer so changing its zoom parameter wont work for that.
<object data="http://www.nclabor.com/wh/faqs.pdf?#view=fitH"
type="application/pdf"
width="100%" height="100%">
<param name="view" value="fitH" />
</object>
Does Adobe's document 'Parameters for opening PDF files' help you?
According to that document, something like
<object data="/path/to/file.pdf" type="application/pdf">
<param name="view" value="Fit" />
</object>
could work, or even
<object
data="/path/to/file.pdf#toolbar=1&navpanes=0&scrollbar=1&page=3&view=FitV"
type="application/pdf">
<p>It appears you don't have a PDF plugin for this browser.
No problem though...
You can <a href="/path/to/file.pdf">click here to download the PDF</a>.
</p>
</object>
Another late answer (looks like we're on a 2-year cycle...)
I found that setting the parameter #zoom=Fit finally did the trick. This is only in FF so far. Chrome is laughing at every parameter I feed it.
Note that the documentation states that view gets the Fit values, but zoom is the one that seems to do anything with them.
I hope this helps someone down the line.